html {
    width: 100%;
    min-height: 100%;
    background-color: #0f0c29;
}

body {
    width: 100%;
    min-height: 100vh;
    /* Changed from height: 100% */
    margin: 0;
    padding: 0;
    font-family: 'Lato', sans-serif;

    /* Smooth background that stays fixed to the camera */
    background: linear-gradient(-45deg, #0f0c29, #2b1b54, #1a1a3a, #0f0c29);
    background-size: 400% 400%;
    background-attachment: fixed;
    /* Fixes the harsh cutoff line */
    animation: gradientBG 20s ease infinite;

    color: #f7fafc;
    overflow-x: hidden;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.font-cinzel {
    font-family: 'Cinzel', serif;
}

.font-lato {
    font-family: 'Lato', sans-serif;
}

.hidden {
    display: none !important;
}

/* Perfect Color Theme Overlay - Glassmorphism */
.glass-panel {
    background: rgba(45, 27, 84, 0.3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Star particle container */
.star-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.star {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: twinkle infinite ease-in-out;
    opacity: 0;
}

@keyframes twinkle {
    0% {
        transform: translateY(0) scale(0);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(-15vh) scale(0.8);
        opacity: 0;
    }
}

/* Fade-in animation */
.fade-in-section {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Glowing text */
@keyframes glow {

    0%,
    100% {
        text-shadow: 0 0 10px #a78bfa, 0 0 20px #a78bfa, 0 0 30px #c4b5fd;
    }

    50% {
        text-shadow: 0 0 20px #a78bfa, 0 0 30px #c4b5fd, 0 0 40px #c4b5fd;
    }
}

.glowing-text {
    animation: glow 3s ease-in-out infinite;
}

/* Scroll down indicator */
.scroll-down {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    animation: moveDown 2.5s infinite ease-in-out;
}

@keyframes moveDown {

    0%,
    100% {
        transform: translate(-50%, 0);
    }

    50% {
        transform: translate(-50%, 15px);
    }
}

/* Gallery hover effects */
.gallery-item {
    transition: transform 0.5s ease, filter 0.5s ease;
    cursor: pointer;
}

.gallery-item:hover {
    transform: scale(1.03);
    filter: brightness(1.15);
}

/* Canvas styling */
canvas {
    display: block;
}