@import url('https://fonts.googleapis.com/css2?family=Pacifico&family=Dancing+Script:wght@400;700&display=swap');

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

:root {
    --dark-color: #000;
    --primary-cyan: #00fffa;
    --secondary-cyan: #39c6d6;
    --leaf-color: #a7ffee;
    --light-yellow: #fffb00;
    --heart-red: #ff1744;
    --star-color: #ffffff;
}

body {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    min-height: 100vh;
    background-color: var(--dark-color);
    overflow: hidden;
    perspective: 1000px;
    position: relative;
}

/* Enhanced Night Sky */
.night {
    position: fixed;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    width: 100%;
    height: 100%;
    filter: blur(0.1vmin);
    background-image:
        radial-gradient(ellipse at top, transparent 0%, var(--dark-color)),
        radial-gradient(ellipse at bottom, var(--dark-color), rgba(145, 233, 255, 0.2)),
        repeating-linear-gradient(220deg, black 0px, black 19px, transparent 19px, transparent 22px),
        repeating-linear-gradient(189deg, black 0px, black 19px, transparent 19px, transparent 22px),
        repeating-linear-gradient(148deg, black 0px, black 19px, transparent 19px, transparent 22px),
        linear-gradient(90deg, var(--primary-cyan), #f0f0f0);
    animation: night-pulse 20s ease-in-out infinite;
}

@keyframes night-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* Stars */
.stars {
    position: fixed;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--star-color);
    border-radius: 50%;
    animation: twinkle 3s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.5); }
}

/* Shooting Stars */
.shooting-star {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, var(--star-color), transparent);
    animation: shoot 3s linear infinite;
    opacity: 0;
}

@keyframes shoot {
    0% {
        opacity: 1;
        transform: translateX(0) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(300px) translateY(300px);
    }
}

/* Particles */
.particle {
    position: absolute;
    pointer-events: none;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(167, 255, 238, 0.8), transparent);
    animation: float-particle 15s linear infinite;
}

@keyframes float-particle {
    0% {
        transform: translateY(100vh) translateX(0) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(50px) scale(1);
        opacity: 0;
    }
}

/* Flowers Container */
.flowers {
    position: relative;
    transform: scale(0.9);
    z-index: 10;
}

.flower {
    position: absolute;
    bottom: 10vmin;
    transform-origin: bottom center;
    z-index: 10;
    --fl-speed: 4s;
    transition: transform 0.3s ease;
}

.flower:hover {
    transform: scale(1.1) !important;
}

.flower--1 {
    left: 20vw;
    transform: scale(0.6);
    animation: moving-flower-1 var(--fl-speed) linear infinite;
}

.flower--2 {
    left: 35vw;
    transform: scale(0.8);
    animation: moving-flower-2 var(--fl-speed) linear infinite;
}

.flower--3 {
    left: 50vw;
    transform: scale(0.9);
    animation: moving-flower-3 var(--fl-speed) linear infinite;
}

.flower--4 {
    left: 65vw;
    transform: scale(0.7);
    animation: moving-flower-1 var(--fl-speed) linear infinite;
    animation-delay: 0.5s;
}

.flower--5 {
    left: 80vw;
    transform: scale(0.75);
    animation: moving-flower-2 var(--fl-speed) linear infinite;
    animation-delay: 1s;
}

.flower__leafs {
    position: relative;
    animation: blooming-flower 2s backwards;
}

.flower__leaf {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 8vmin;
    height: 11vmin;
    border-radius: 51% 49% 47% 53%/44% 45% 55% 69%;
    background-color: var(--leaf-color);
    background-image: linear-gradient(to top, #54b8aa, var(--leaf-color));
    transform-origin: bottom center;
    opacity: 0.9;
    box-shadow:
        inset 0 0 2vmin rgba(255, 255, 255, 0.5),
        0 0 10px rgba(167, 255, 238, 0.3);
}

.flower__leaf--1 {
    transform: translate(-10%, 1%) rotateY(40deg) rotateX(-50deg);
    animation: leaf-glow 3s ease-in-out infinite;
}

.flower__leaf--2 {
    transform: translate(-50%, -4%) rotateX(40deg);
    animation: leaf-glow 3s ease-in-out infinite 0.5s;
}

.flower__leaf--3 {
    transform: translate(-90%, 0%) rotateY(45deg) rotateX(50deg);
    animation: leaf-glow 3s ease-in-out infinite 1s;
}

.flower__leaf--4 {
    width: 8vmin;
    height: 8vmin;
    transform-origin: bottom left;
    border-radius: 4vmin 10vmin 4vmin 4vmin;
    transform: translate(0%, 18%) rotateX(70deg) rotate(-43deg);
    background-image: linear-gradient(to top, var(--secondary-cyan), var(--leaf-color));
    z-index: 1;
    opacity: 0.8;
    animation: leaf-glow 3s ease-in-out infinite 1.5s;
}

@keyframes leaf-glow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.3); }
}

.flower__white-circle {
    position: absolute;
    left: -3.5vmin;
    top: -3vmin;
    width: 9vmin;
    height: 4vmin;
    border-radius: 50%;
    background-color: #fff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.6);
    animation: center-glow 2s ease-in-out infinite;
}

@keyframes center-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 255, 255, 0.6); }
    50% { box-shadow: 0 0 30px rgba(255, 255, 255, 0.9); }
}

.flower__line {
    height: 55vmin;
    width: 1.5vmin;
    background-image:
        linear-gradient(to left, rgba(0, 0, 0, 0.2), transparent, rgba(255, 255, 255, 0.2)),
        linear-gradient(to top, transparent 10%, #14757a, var(--secondary-cyan));
    box-shadow:
        inset 0 0 2px rgba(0, 0, 0, 0.5),
        0 0 5px rgba(57, 198, 214, 0.4);
    animation: grow-flower-tree 4s backwards;
}

.flower__light {
    position: absolute;
    bottom: 0vmin;
    width: 1vmin;
    height: 1vmin;
    background-color: var(--light-yellow);
    border-radius: 50%;
    filter: blur(0.2vmin);
    animation: light-ans 4s linear infinite backwards;
}

.flower__light--1 { animation-delay: 0s; }
.flower__light--2 { animation-delay: 0.3s; }
.flower__light--3 { animation-delay: 0.6s; }
.flower__light--4 { animation-delay: 0.9s; }
.flower__light--5 { animation-delay: 1.2s; }
.flower__light--6 { animation-delay: 1.5s; }

/* Message Container */
.message-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 100;
}

.message {
    font-family: 'Pacifico', cursive;
    font-size: 6vmin;
    color: #ffffff;
    text-shadow:
        0 0 10px rgba(255, 255, 255, 0.5),
        0 0 20px rgba(167, 255, 238, 0.3),
        0 0 30px rgba(167, 255, 238, 0.2);
    opacity: 0;
    animation: fade-in 4s ease-in-out 2s forwards, text-glow 3s ease-in-out 6s infinite;
    margin-bottom: 2vmin;
}

.sub-message {
    font-family: 'Dancing Script', cursive;
    font-size: 3.5vmin;
    color: var(--leaf-color);
    text-shadow:
        0 0 5px rgba(167, 255, 238, 0.5),
        0 0 10px rgba(167, 255, 238, 0.3);
    opacity: 0;
    animation: fade-in 4s ease-in-out 4s forwards;
}

@keyframes text-glow {
    0%, 100% {
        text-shadow:
            0 0 10px rgba(255, 255, 255, 0.5),
            0 0 20px rgba(167, 255, 238, 0.3),
            0 0 30px rgba(167, 255, 238, 0.2);
    }
    50% {
        text-shadow:
            0 0 20px rgba(255, 255, 255, 0.8),
            0 0 40px rgba(167, 255, 238, 0.6),
            0 0 60px rgba(167, 255, 238, 0.4);
    }
}

/* Hearts */
.heart {
    position: absolute;
    width: 20px;
    height: 20px;
    opacity: 0;
    animation: float-heart 6s ease-in infinite;
}

.heart::before,
.heart::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 32px;
    background: var(--heart-red);
    border-radius: 50px 50px 0 0;
}

.heart::before {
    left: 10px;
    transform: rotate(-45deg);
    transform-origin: 0 100%;
}

.heart::after {
    left: 0;
    transform: rotate(45deg);
    transform-origin: 100% 100%;
}

@keyframes float-heart {
    0% {
        opacity: 0;
        transform: translateY(0) rotate(0deg);
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(-100vh) rotate(360deg);
    }
}

/* Control Buttons */
.controls {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 1000;
}

.control-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--leaf-color);
    background: rgba(0, 0, 0, 0.5);
    color: var(--leaf-color);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.control-btn:hover {
    background: rgba(167, 255, 238, 0.2);
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(167, 255, 238, 0.5);
}

.control-btn.active {
    background: rgba(167, 255, 238, 0.3);
    box-shadow: 0 0 15px rgba(167, 255, 238, 0.7);
}

/* Animations */
@keyframes fade-in {
    to { opacity: 1; }
}

@keyframes moving-flower-1 {
    0%, 100% { transform: rotate(2deg); }
    50% { transform: rotate(-2deg); }
}

@keyframes moving-flower-2 {
    0%, 100% { transform: rotate(18deg); }
    50% { transform: rotate(14deg); }
}

@keyframes moving-flower-3 {
    0%, 100% { transform: rotate(-18deg); }
    50% { transform: rotate(-20deg) rotateY(-10deg); }
}

@keyframes blooming-flower {
    0% { transform: scale(0); }
}

@keyframes grow-flower-tree {
    0% { height: 0; }
}

@keyframes light-ans {
    0% {
        opacity: 0;
        transform: translateY(0vmin);
    }
    25% {
        opacity: 1;
        transform: translateY(-5vmin) translateX(-2vmin);
    }
    50% {
        opacity: 1;
        transform: translateY(-15vmin) translateX(2vmin);
        filter: blur(0.2vmin);
    }
    75% {
        transform: translateY(-20vmin) translateX(-2vmin);
        filter: blur(0.2vmin);
    }
    100% {
        transform: translateY(-30vmin);
        opacity: 0;
        filter: blur(1vmin);
    }
}

/* Loading State */
.not-loaded * {
    animation-play-state: paused !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .message {
        font-size: 8vmin;
    }

    .sub-message {
        font-size: 5vmin;
    }

    .flower {
        transform: scale(0.7) !important;
    }

    .control-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .message {
        font-size: 10vmin;
    }

    .sub-message {
        font-size: 6vmin;
    }

    .flower {
        transform: scale(0.5) !important;
    }
}
