body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(to bottom, #07111f, #0d1020, #160812);
    font-family: Georgia, "Times New Roman", serif;
    overflow: hidden;
    position: relative;
    color: #f5ecf2;
}

.moon-glow {
    position: absolute;
    top: 80px;
    right: 140px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(220, 230, 255, 0.85) 0%, rgba(160, 180, 255, 0.18) 45%, rgba(0, 0, 0, 0) 75%);
    border-radius: 50%;
    filter: blur(2px);
}

.container {
    position: relative;
    z-index: 2;
    width: 80%;
    max-width: 760px;
    text-align: center;
    padding: 60px 40px;
    background: rgba(10, 7, 14, 0.72);
    border: 1px solid rgba(255, 220, 240, 0.18);
    border-radius: 24px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.55);
}

.intro-line {
    font-size: 16px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #b8bfd8;
    margin-bottom: 18px;
}

h1 {
    margin: 0;
    font-size: 64px;
    color: #f3d5e4;
    text-shadow: 0 4px 14px rgba(0, 0, 0, 0.65);
}

.subtitle {
    font-size: 24px;
    line-height: 1.8;
    color: #f8eef3;
    margin-top: 28px;
    margin-bottom: 36px;
}

.enter-button {
    background: linear-gradient(to bottom, #2a1d29, #161018);
    color: #f7dce7;
    border: 1px solid #a77992;
    padding: 14px 28px;
    font-size: 18px;
    font-family: inherit;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.35);
}

.enter-button:hover {
    background: linear-gradient(to bottom, #3b2740, #1f1422);
    transform: scale(1.03);
}

.enter-button:active {
    transform: scale(0.99);
}

/* Mysterious gothic door */

.door-scene {
    width: 150px;
    height: 230px;
    margin: 35px auto;
    perspective: 700px;
    background: radial-gradient(circle, #a49bd8, #32264c);
    border: 8px solid #18101d;
    border-radius: 75px 75px 5px 5px;
    box-shadow: 0 0 30px rgba(120, 90, 175, 0.4);
}

.door {
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, #352338, #130e1c);
    border-radius: 65px 65px 3px 3px;
    position: relative;
    cursor: pointer;
    transform-origin: left;
    transition: transform 1.5s ease;
}

.door-knob {
    position: absolute;
    right: 15px;
    top: 55%;
    width: 12px;
    height: 12px;
    background: #c9a56b;
    border-radius: 50%;
    box-shadow: 0 0 8px #c9a56b;
}

.door-panel {
    position: absolute;
    top: 30%;
    left: 25%;
    width: 50%;
    height: 45%;
    border: 2px solid #59415e;
    border-radius: 35px 35px 5px 5px;
    pointer-events: none;
}

.door.open {
    transform: rotateY(-110deg);
}

.door-message {
    color: #c7b5d1;
    font-style: italic;
    font-size: 16px;
}
/* Secret black rose garden */

.garden {
    min-height: 100vh;
    width: 100%;
    padding: 80px 20px;
    box-sizing: border-box;
    text-align: center;
    color: #f3e6ee;
    background:
        radial-gradient(circle at top, rgba(170, 180, 255, 0.12), transparent 30%),
        linear-gradient(to bottom, #050811, #0a0d19, #120814);
}

.garden-title {
    font-size: 52px;
    margin-bottom: 15px;
    color: #f0d8e5;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.08);
}

.garden-text {
    font-size: 22px;
    color: #cdb9c8;
    margin-bottom: 60px;
    font-style: italic;
}

.rose-garden {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 40px;
    flex-wrap: wrap;
}
.rose {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 170px;
    position: relative;
}

/* hand-drawn black rose bloom */
.rose-bloom {
    width: 88px;
    height: 88px;
    position: relative;
    margin-bottom: 10px;
    border-radius: 52% 48% 55% 45% / 45% 52% 48% 55%;
    background: radial-gradient(circle at 40% 38%, #4a394b 0%, #2a1d2b 24%, #120d15 52%, #050406 82%);
    box-shadow:
        inset 6px 6px 10px rgba(93, 72, 97, 0.18),
        inset -8px -8px 12px rgba(0, 0, 0, 0.6),
        0 0 14px rgba(70, 40, 80, 0.18);
    transform: rotate(-8deg);
}

/* outer petals */
.rose-bloom::before {
    content: "";
    position: absolute;
    width: 112px;
    height: 78px;
    left: -11px;
    top: 10px;
    border-radius: 55% 45% 58% 42% / 48% 54% 46% 52%;
    background:
        radial-gradient(circle at 45% 35%, #2f2131 0%, #181119 48%, #050406 82%);
    transform: rotate(-16deg);
    z-index: -1;
    box-shadow:
        -18px 8px 0 -14px #110c12,
        18px 5px 0 -14px #110c12,
        0 18px 0 -16px #130d14;
}

/* inner folded petals */
.rose-bloom::after {
    content: "";
    position: absolute;
    width: 34px;
    height: 34px;
    left: 26px;
    top: 22px;
    border-radius: 50% 44% 56% 48%;
    background: radial-gradient(circle at 40% 40%, #634d64 0%, #2d202d 40%, #120d14 82%);
    box-shadow:
        -14px 5px 0 -7px #201521,
        14px 4px 0 -7px #1d141e,
        0 -10px 0 -9px #2a1d2b,
        0 12px 0 -10px #130d14;
}

/* sketched stem */
.rose-stem {
    width: 7px;
    height: 118px;
    background: linear-gradient(to bottom, #314a31, #162417);
    border-radius: 8px;
    position: relative;
    transform: rotate(1deg);
}

/* leaves */
.rose-stem::before,
.rose-stem::after {
    content: "";
    position: absolute;
    width: 32px;
    height: 14px;
    background: #213722;
    border-radius: 0 100% 0 100%;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);
}

.rose-stem::before {
    top: 28px;
    left: -28px;
    transform: rotate(-14deg);
}

.rose-stem::after {
    top: 64px;
    right: -28px;
    transform: scaleX(-1) rotate(-18deg);
}

.rose-label {
    margin-top: 16px;
    font-size: 17px;
    line-height: 1.2;
    color: #ead8e3;
    text-align: center;
}

/* make each rose feel less perfectly identical */
.rose:nth-child(1) .rose-bloom {
    transform: rotate(-12deg);
}

.rose:nth-child(2) .rose-bloom {
    transform: rotate(7deg);
}

.rose:nth-child(3) .rose-bloom {
    transform: rotate(-5deg);
}

.rose:nth-child(4) .rose-bloom {
    transform: rotate(10deg);
}

.rose:nth-child(1) .rose-stem {
    transform: rotate(-2deg);
}

.rose:nth-child(2) .rose-stem {
    transform: rotate(2deg);
}

.rose:nth-child(3) .rose-stem {
    transform: rotate(-1deg);
}

.rose:nth-child(4) .rose-stem {
    transform: rotate(1deg);
}

.hidden {
    display: none !important;
}

/* Fix black rose image sizes */

.rose-image {
    width: 140px;
    height: 220px;
    max-width: 100%;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 0 10px rgba(120, 70, 150, 0.3));
}

.rose {
    width: 170px;
    flex-shrink: 0;
}

.rose-garden {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 35px;
}

.rose-garden {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 25px;
    max-width: 950px;
    width: 100%;
    margin: 40px auto;
    align-items: end;
}

.rose {
    width: 100%;
    min-width: 0;
}

.rose-image {
    width: 100%;
    max-width: 165px;
    height: 250px;
    object-fit: contain;
}

body {
    overflow-x: hidden;
    overflow-y: auto;
}

@media (max-width: 650px) {
    .rose-garden {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Moonlit gothic garden */

.garden {
    position: relative;
    overflow: hidden;
    padding-top: 140px;
}

.garden-title,
.garden-text,
.rose-garden {
    position: relative;
    z-index: 3;
}

/* Glowing moon */
.moon {
    position: absolute;
    top: 30px;
    right: 9%;
    width: 170px;
    height: 170px;
    border-radius: 50%;
    background: radial-gradient(
        circle at 35% 35%,
        #f0efff 0%,
        #c6c9e8 65%,
        #888bb7 100%
    );
    box-shadow:
        0 0 45px rgba(180, 190, 255, 0.35),
        0 0 110px rgba(130, 140, 230, 0.18);
    opacity: 0.75;
    z-index: 1;
    pointer-events: none;
}

/* Stars */
.stars {
    position: absolute;
    top: 70px;
    left: 12%;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: white;
    box-shadow:
        100px 30px #aaaac8,
        230px 80px #ddd9ed,
        360px 15px #aaaac8,
        490px 110px #ddd9ed,
        620px 40px #aaaac8,
        750px 90px #ddd9ed;
    z-index: 1;
    pointer-events: none;
}

/* Crooked branches */
.branch-decoration {
    position: absolute;
    bottom: 60px;
    width: 180px;
    height: 300px;
    border-left: 13px solid #05050a;
    border-radius: 50%;
    z-index: 2;
    pointer-events: none;
}

.branch-decoration::before,
.branch-decoration::after {
    content: "";
    position: absolute;
    background: #05050a;
    height: 10px;
    border-radius: 10px;
}

.branch-decoration::before {
    width: 125px;
    top: 85px;
    left: 8px;
    transform: rotate(-35deg);
}

.branch-decoration::after {
    width: 95px;
    top: 170px;
    left: 10px;
    transform: rotate(25deg);
}

.left-branch {
    left: -60px;
    transform: rotate(-12deg);
}

.right-branch {
    right: -60px;
    transform: scaleX(-1) rotate(-12deg);
}

/* Smaller moon on phones */
@media (max-width: 650px) {
    .moon {
        width: 100px;
        height: 100px;
        right: 5%;
        top: 25px;
    }

    .branch-decoration {
        opacity: 0.45;
    }
}

/* Fix clickable roses */

.rose-button {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    width: 100%;
    color: #f0d8e5;
    font-family: Georgia, serif;
    cursor: pointer;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.rose-button .rose-label {
    display: block;
    color: #f0d8e5;
    margin-top: 12px;
    text-align: center;
}

.rose-image {
    display: block;
    width: 100%;
    max-width: 165px;
    height: 250px;
    object-fit: contain;
}

/* Gothic poetry reading window */

.poem-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(3, 3, 12, 0.92);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.poem-overlay[hidden] {
    display: none !important;
}

.poem-card {
    position: relative;
    width: 100%;
    max-width: 650px;
    max-height: 85vh;
    overflow-y: auto;
    box-sizing: border-box;
    padding: 55px 40px;
    background: #e5d8c7;
    border: 4px double #4b3449;
    border-radius: 8px;
    box-shadow: 0 0 50px rgba(139, 94, 170, 0.3);
    text-align: center;
}

.poem-card h2 {
    font-size: 32px;
    color: #392439;
    margin-bottom: 30px;
}

.poem-card #poemText {
    font-size: 19px;
    line-height: 1.9;
    color: #342634;
    white-space: pre-line;
}

.poem-signature {
    color: #695168;
    font-style: italic;
    margin-top: 35px;
}

.close-poem {
    position: absolute;
    top: 12px;
    right: 18px;
    background: none;
    border: none;
    color: #342634;
    font-size: 34px;
    cursor: pointer;
}

@media (max-width: 650px) {
    .poem-card {
        padding: 55px 22px 30px;
    }

    .poem-card h2 {
        font-size: 26px;
    }

    .poem-card #poemText {
        font-size: 17px;
    }
}

/* Gentle movement for black roses */

@keyframes roseSway {
    0%, 100% {
        transform: rotate(-3deg);
    }

    50% {
        transform: rotate(3deg);
    }
}

.rose-image {
    animation: roseSway 5s ease-in-out infinite;
    transform-origin: bottom center;
    transition: filter 0.4s ease;
}

/* Make each rose move differently */

.rose:nth-child(2n) .rose-image {
    animation-delay: -2s;
}

.rose:nth-child(3n) .rose-image {
    animation-duration: 6s;
}

/* Glow when a rose is selected */

.rose-button:hover .rose-image,
.rose-button:focus-visible .rose-image {
    filter: drop-shadow(0 0 18px rgba(170, 100, 220, 0.65));
}

/* Respect reduced-motion preferences */

@media (prefers-reduced-motion: reduce) {
    .rose-image {
        animation: none;
    }
}

/* Phone-friendly design */

@media (max-width: 650px) {
    body {
        padding: 0;
        overflow-x: hidden;
    }

    .container {
        width: 90%;
        padding: 35px 18px;
        box-sizing: border-box;
    }

    .container h1 {
        font-size: 38px;
    }

    .subtitle {
        font-size: 18px;
    }

    .garden {
        padding: 110px 12px 45px;
    }

    .garden-title {
        font-size: 32px;
    }

    .garden-text {
        font-size: 16px;
        margin-bottom: 30px;
    }

    .rose-garden {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px 12px;
    }

    .rose-image {
        width: 100%;
        max-width: 130px;
        height: 175px;
    }

    .rose-label {
        font-size: 14px;
    }

    .poem-card {
        max-height: 85dvh;
        padding: 50px 18px 25px;
    }

    .poem-card #poemText {
        font-size: 16px;
        line-height: 1.7;
    }

    .branch-decoration {
        opacity: 0.3;
    }
}

/* Photographs inside the poetry letters */

.poem-image {
    display: block;
    width: 100%;
    max-width: 380px;
    max-height: 320px;
    object-fit: contain;
    margin: 0 auto 30px;
    border: 5px solid #f4e9df;
    outline: 1px solid #78576b;
    border-radius: 3px;
    box-shadow: 0 8px 25px rgba(30, 15, 25, 0.25);
}

/* Adjust photographs for phones */

@media (max-width: 650px) {
    .poem-image {
        max-width: 100%;
        max-height: 260px;
        margin-bottom: 25px;
    }
}
