@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&display=swap');

body {
    margin: 0;
    padding: 0;
    font-family: 'Playfair Display', serif;
    background: linear-gradient(to bottom, #001122, #000011);
    color: #e0e0e0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    perspective: 1000px; /* Added for parallax depth */
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(224,224,224,0.15) 0%, rgba(0,0,0,0.6) 100%);
    pointer-events: none;
}

/* Styling for subtle light rays with parallax */
.light-rays {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        circle at 50% 50%,
        rgba(255, 255, 255, 0.05) 0%,
        rgba(255, 255, 255, 0) 60%
    );
    opacity: 0.1;
    animation: rotateRays 60s linear infinite;
    pointer-events: none;
    z-index: 1;
    transform-style: preserve-3d; /* Enable 3D transforms for parallax */
    transform: translateZ(-10px) scale(1.1); /* Parallax shift */
}

.content {
    text-align: center;
    z-index: 2;
    position: relative;
}

.logo {
    width: 370px;
    height: 370px;
    margin-bottom: 50px;
    border: 3px solid transparent;
    border-radius: 50%;
    transition: transform 1.2s ease, box-shadow 0.4s ease;
    position: relative;
    z-index: 2;
    transform-origin: center center;
    transform: scale(1);
    animation: divineFadeInLogo 3s ease-out forwards;
}

/* Amplified Halo/Aura Effect */
.logo::before {
    content: '';
    position: absolute;
    top: -35px;
    left: -35px;
    right: -35px;
    bottom: -35px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(255,215,0,0.2) 0%, /* Inner gold ring */
        rgba(255,255,255,0.15) 30%,
        rgba(255,215,0,0.1) 50%, /* Mid gold hint */
        rgba(255,255,255,0) 70%
    );
    filter: blur(30px);
    z-index: -2;
    opacity: 0.8;
    transition: opacity 0.4s ease, transform 0.4s ease; /* Added transform transition */
    animation: haloPulse 5s infinite alternate ease-in-out, haloExpand 8s infinite alternate ease-in-out; /* Added expansion animation */
}

/* Metallic Border */
.logo::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    background: linear-gradient(
        to right,
        #808080 0%,
        #c0c0c0 25%,
        #f0f0f0 50%,
        #c0c0c0 75%,
        #808080 100%
    );
    z-index: -1;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    box-shadow: 0 0 8px rgba(255,255,255,0.5);
    animation: borderPulse 2s infinite alternate ease-in-out;
}

.logo:hover {
    transform: scale(1.1) rotateZ(2deg);
    box-shadow: 0 0 35px rgba(224,224,224,0.8), 0 0 60px rgba(224,224,224,0.4);
    filter: brightness(1.2); /* Added ethereal flare */
}

.logo:hover::before {
    opacity: 1;
    animation: none;
}

.logo:hover::after {
    animation: none;
    box-shadow: 0 0 20px rgba(255,255,255,0.9);
}

.motto-container {
    position: relative;
    width: fit-content;
    margin: 0 auto;
    animation: divineFadeInMotto 2s ease-out forwards;
    animation-delay: 2s;
    opacity: 0;
}

/* Motto Text Styling */
.motto-latin, .motto-english {
    margin: 0;
    transition: opacity 0.5s ease;
    background: linear-gradient(
        to right,
        #c0c0c0 0%,
        #f0f0f0 25%,
        #ffffff 50%,
        #f0f0f0 75%,
        #c0c0c0 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7), -1px -1px 1px rgba(255,255,255,0.05);
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.motto-latin {
    font-size: 2.8rem;
    font-style: italic;
    letter-spacing: 1.5px;
    opacity: 1;
}

.motto-english {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    font-size: 2.8rem;
    opacity: 0;
}

.motto-container:hover .motto-latin {
    opacity: 0;
}

.motto-container:hover .motto-english {
    opacity: 1;
}

/* Keyframes */
@keyframes divineFadeInLogo {
    0% { opacity: 0; filter: blur(70px); transform: scale(0.8); }
    30% { opacity: 1; filter: blur(30px); transform: scale(0.9); }
    100% { opacity: 1; filter: blur(0); }
}

@keyframes divineFadeInMotto {
    0% { opacity: 0; filter: blur(30px); transform: translateY(20px); }
    50% { opacity: 1; filter: blur(10px); }
    100% { opacity: 1; filter: blur(0); transform: translateY(0); }
}

@keyframes borderPulse {
    0% { box-shadow: 0 0 8px rgba(255,255,255,0.5); }
    50% { box-shadow: 0 0 15px rgba(255,255,255,0.9); }
    100% { box-shadow: 0 0 8px rgba(255,255,255,0.5); }
}

@keyframes rotateRays {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes haloPulse {
    0% { opacity: 0.3; filter: blur(30px); }
    50% { opacity: 0.5; filter: blur(40px); }
    100% { opacity: 0.3; filter: blur(30px); }
}

@keyframes haloExpand {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

canvas {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    opacity: 0.25;
}

#sparkle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
    background-color: transparent;
}

/* Responsiveness */
@media (max-width: 768px) {
    .logo {
        width: 80vw;
        height: 80vw;
    }
    .motto-latin, .motto-english {
        font-size: 1.8rem;
    }
}