:root {
    --ithildin-blue: #a3d8f4;
    --mithril-silver: #e0e6ed;
    --glow-cyan: #4ffaff;
    --stone-dark: #1a1c21;
    --stone-darker: #0d0f12;
    --text-main: #f0f4f8;
    --font-heading: 'Cinzel', serif;
    --font-body: 'Cormorant Garamond', serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--stone-darker);
    color: var(--text-main);
    font-family: var(--font-body);
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at center, #2e3542 0%, var(--stone-darker) 100%);
}

/* Mist/Atmosphere Effect */
.mist-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)" opacity="0.1"/%3E%3C/svg%3E');
    pointer-events: none;
    z-index: 10;
    opacity: 0.4;
    animation: mist-move 60s linear infinite;
}

.container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1200px;
    padding: 2rem;
    display: flex;
    justify-content: center;
}

.content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 3rem;
}

/* Image Styles */
.image-container {
    position: relative;
    width: 400px;
    height: 400px;
    /* Make it square or fit the image aspect ratio */
    display: grid;
    place-items: center;
    /* Removed float animation to make it feel heavy/solid like a door */
}

.gate-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 15px rgba(163, 216, 244, 0.4));
    position: relative;
    z-index: 2;
    mask-image: radial-gradient(circle, black 60%, transparent 100%);
    -webkit-mask-image: radial-gradient(circle, black 60%, transparent 100%);
    border-radius: 4px;
}

.rune-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 420px;
    height: 420px;
    border-radius: 10px;
    /* Rectangular with slight rounding */
    background: radial-gradient(circle at center, rgba(79, 250, 255, 0.08) 0%, transparent 70%);
    box-shadow: 0 0 60px rgba(79, 250, 255, 0.15);
    z-index: 1;
    animation: moon-pulse 6s ease-in-out infinite;
}

/* Removed the spinning circle ::before element as it was forcing a round shape */

/* Text Styles */
.text-content {
    margin-top: 1rem;
    width: 100%;
    /* Ensure full width for centering */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.shimmer-text {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    color: var(--mithril-silver);
    text-transform: uppercase;
    position: relative;
    letter-spacing: 0.2rem;
    text-shadow: 0 0 10px rgba(163, 216, 244, 0.3);
    white-space: nowrap;
    /* Prevents layout shift during font fallback (Runes vs Cinzel) */
    line-height: 1.2;
    min-height: 3.6rem;
    display: block;
}

.shimmer-text::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: var(--glow-cyan);
    opacity: 0.5;
    filter: blur(2px);
    animation: text-glow 4s infinite alternate;
}

.separator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin: 2rem 0;
    opacity: 0.6;
}

.line {
    height: 1px;
    width: 120px;
    background: linear-gradient(90deg, transparent, var(--ithildin-blue), transparent);
}

.symbol {
    color: var(--ithildin-blue);
    font-size: 1.5rem;
    text-shadow: 0 0 8px var(--ithildin-blue);
}

.subtitle {
    font-size: 1.2rem;
    color: rgba(240, 244, 248, 0.7);
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.riddle-container {
    margin-top: 1.5rem;
}

.riddle {
    font-size: 1.4rem;
    font-style: italic;
    color: var(--ithildin-blue);
    opacity: 0.9;
    font-family: var(--font-body);
}

/* Animations */
@keyframes mist-move {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 200px 200px;
    }
}

@keyframes moon-pulse {

    0%,
    100% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 0.9;
        transform: translate(-50%, -50%) scale(1.05);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes text-glow {
    0% {
        opacity: 0.2;
        filter: blur(2px);
    }

    100% {
        opacity: 0.8;
        filter: blur(4px);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .shimmer-text {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 0.9rem;
        padding: 0 1rem;
    }

    .riddle {
        font-size: 1.1rem;
    }

    .image-container {
        width: 280px;
        height: 280px;
    }

    .rune-glow {
        width: 300px;
        height: 300px;
    }
}