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

body {
    height: 100vh;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #0f1215;
    overflow: hidden;
    font-family: 'Montserrat', sans-serif;
    color: #bdc3c7;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

body.allow-scroll {
    overflow-y: auto;
}

.canvas-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

#bg-canvas {
    z-index: 0;
}

#particle-canvas {
    z-index: 1;
    pointer-events: none;
}

.glass-panel {
    position: relative;
    z-index: 2;
    max-width: 650px;
    width: 90%;
    padding: 4rem 3rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    text-align: left;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

h1 {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 600;
    font-size: 4rem;
    margin-bottom: 2rem;
    color: #ecf0f1;
    letter-spacing: -0.02em;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    line-height: 1;
    text-align: center;
}

.text-content p {
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: #bdc3c7;
    text-align: justify;
}

.text-content p:last-child {
    margin-bottom: 0;
    font-style: italic;
    opacity: 0.85;
}

.panel-link {
    position: relative;
    display: block;
    width: fit-content;
    margin: 1.75rem auto 0;
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 0.95rem;
    letter-spacing: 0.12em;
    text-transform: lowercase;
    color: #bdc3c7;
    text-decoration: none;
    opacity: 0.6;
    text-shadow: 0 0 12px rgba(236, 240, 241, 0.35);
    animation: pulseGlow 3.5s ease-in-out infinite;
    transition: opacity 0.4s ease, color 0.4s ease, text-shadow 0.4s ease, letter-spacing 0.6s ease, transform 0.6s ease;
}

.panel-link::after {
    content: '';
    position: absolute;
    left: 8%;
    right: 8%;
    bottom: -6px;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 150, 90, 0) 0%, rgba(255, 150, 90, 0.6) 50%, rgba(255, 150, 90, 0) 100%);
    opacity: 0;
    transform: scaleX(0.6);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.panel-link:hover,
.panel-link:focus-visible {
    opacity: 0.95;
    color: #f7e2b7;
    letter-spacing: 0.2em;
    transform: translateY(-1px);
    text-shadow:
        0 0 8px rgba(255, 198, 120, 0.55),
        0 0 16px rgba(255, 140, 90, 0.45),
        0 0 28px rgba(255, 110, 70, 0.35);
    animation: pulseGlow 3.5s ease-in-out infinite, igniteFlicker 0.8s ease-out;
}

.panel-link:hover::after,
.panel-link:focus-visible::after {
    opacity: 1;
    transform: scaleX(1);
    animation: emberFlicker 1.4s ease-in-out infinite;
}

strong {
    font-weight: 400;
    color: #ecf0f1;
}

.enter-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 18, 21, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
    color: #ecf0f1;
    cursor: pointer;
    transition: opacity 1s ease, visibility 1s ease;
}

.enter-text {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 1.4rem;
    letter-spacing: 0.15em;
    text-transform: lowercase;
    opacity: 0.6;
    filter: blur(2px);
    transform: scale(0.98);
    transition: opacity 1.2s cubic-bezier(0.2, 1, 0.3, 1),
        letter-spacing 1.2s cubic-bezier(0.2, 1, 0.3, 1),
        filter 1.2s cubic-bezier(0.2, 1, 0.3, 1),
        transform 1.2s cubic-bezier(0.2, 1, 0.3, 1);
}

.enter-overlay:hover .enter-text {
    opacity: 1;
    letter-spacing: 0.35em;
    filter: blur(0);
    transform: scale(1);
}

.enter-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.volume-control {
    position: fixed;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 3;
    height: 30px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

body.audio-ready .volume-control {
    opacity: 0.2;
    pointer-events: auto;
}

body.audio-ready .volume-control:hover {
    opacity: 1;
}

.mute-toggle {
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.4);
    width: 14px;
    height: 14px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.mute-toggle svg {
    width: 14px;
    height: 14px;
    transition: opacity 0.3s ease;
}

.mute-toggle .icon-muted {
    opacity: 0;
    position: absolute;
}

.mute-toggle.is-muted .icon-muted {
    opacity: 1;
}

.mute-toggle.is-muted .icon-default {
    opacity: 0;
}

.volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 200px;
    height: 1px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    cursor: grab;
    transition: background 0.3s ease;
}

.volume-slider:active {
    cursor: grabbing;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    transition: transform 0.2s ease;
}

.volume-slider::-moz-range-thumb {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: #ffffff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    transition: transform 0.2s ease;
}

.volume-slider::-moz-range-track {
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
}

.volume-control:hover .volume-slider::-webkit-slider-thumb,
.volume-control:active .volume-slider::-webkit-slider-thumb,
.volume-control:hover .volume-slider::-moz-range-thumb,
.volume-control:active .volume-slider::-moz-range-thumb {
    transform: scale(1.5);
}

.volume-slider:focus {
    outline: none;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes grainShift {
    0% {
        transform: translate(0, 0);
    }
    20% {
        transform: translate(-2%, -1%);
    }
    40% {
        transform: translate(1%, 2%);
    }
    60% {
        transform: translate(-1%, 1%);
    }
    80% {
        transform: translate(2%, -2%);
    }
    100% {
        transform: translate(0, 0);
    }
}

@keyframes pulseGlow {
    0% {
        opacity: 0.45;
        text-shadow: 0 0 8px rgba(236, 240, 241, 0.25);
    }
    50% {
        opacity: 0.8;
        text-shadow: 0 0 16px rgba(236, 240, 241, 0.45);
    }
    100% {
        opacity: 0.45;
        text-shadow: 0 0 8px rgba(236, 240, 241, 0.25);
    }
}

@keyframes igniteFlicker {
    0% {
        text-shadow:
            0 0 6px rgba(255, 204, 140, 0.4),
            0 0 14px rgba(255, 142, 90, 0.3);
    }
    40% {
        text-shadow:
            0 0 12px rgba(255, 214, 160, 0.7),
            0 0 20px rgba(255, 132, 80, 0.5),
            0 0 32px rgba(255, 110, 70, 0.35);
    }
    100% {
        text-shadow:
            0 0 8px rgba(255, 198, 120, 0.55),
            0 0 16px rgba(255, 140, 90, 0.45),
            0 0 28px rgba(255, 110, 70, 0.35);
    }
}

@keyframes emberFlicker {
    0% {
        opacity: 0.6;
        transform: scaleX(0.85);
    }
    50% {
        opacity: 1;
        transform: scaleX(1);
    }
    100% {
        opacity: 0.7;
        transform: scaleX(0.9);
    }
}

.film-grain {
    position: fixed;
    inset: 0;
    z-index: 50;
    pointer-events: none;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
    animation: grainShift 1s steps(2) infinite;
}

@media (max-width: 600px) {
    body {
        align-items: flex-start;
    }

    body.allow-scroll {
        height: auto;
        min-height: 100vh;
    }

    .glass-panel {
        padding: 2rem;
        margin: 2.5rem 1.5rem 5rem;
    }

    h1 {
        font-size: 3rem;
    }

    .text-content p {
        font-size: 0.9rem;
        text-align: left;
    }

    .volume-control {
        bottom: 50px;
        gap: 8px;
    }

    .volume-slider {
        width: 160px;
    }

    .panel-link {
        margin-top: 1.5rem;
    }
}
