@import url('https://fonts.googleapis.com/css2?family=Alex+Brush&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Pirata+One&display=swap');
#level-four-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f5ead0;
    z-index: 1;
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    overflow: hidden;
}
#level-four-container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: radial-gradient(
        circle at center,
        transparent 0%,
        transparent 50%,
        rgba(61, 37, 10, 0.08) 80%,
        rgba(61, 37, 10, 0.18) 100%
    );
    z-index: 2;
    opacity: 0;
    animation: vignette-pulse 4s ease-in-out infinite;
    animation-delay: 1.2s;
}
#level-four-container .counter-box,
#level-four-container .password-container,
#level-four-container .book-image-container,
#level-four-container .final-message {
    position: relative;
    z-index: 3;
}
@keyframes vignette-pulse {
    0% {
        opacity: 0;
    }
    30% {
        opacity: 0.6;
    }
    60% {
        opacity: 1;
    }
    100% {
        opacity: 0.6;
    }
}
#level-four-container .counter-box {
    background: rgba(225, 210, 175, 0.75);
    border: 8px solid rgba(61, 37, 10, 0.90);
    padding: 0px 35px;
    color: rgba(61, 37, 10, 0.90);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 200px;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}
#level-four-container .level,
#level-four-container .clicks {
    font-size: 2em;
    font-weight: 800;
    letter-spacing: 3px;
    margin: 0;
    line-height: 1;
    text-shadow: none;
    color: rgba(61, 37, 10, 0.90);
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}
#level-four-container .password-container {
    position: fixed;
    bottom: 7%;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 700px;
    text-align: center;
    z-index: 4;
}
#level-four-container .shadow-container {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 2;
}
.interactive-container {
    position: relative;
    z-index: 5;
    pointer-events: auto;
}
#level-four-container .password-input {
    width: 100%;
    cursor: cell;
    font-family: "Alex Brush", serif;
    font-size: 3.5em !important;
    font-weight: 700;
    border: none;
    color: rgba(61, 37, 10, 0.90);
    text-align: center;
    outline: none;
    background: transparent;
    position: relative;
    z-index: 3;
    bottom: 0px;
    line-height: 0.8;
}   
#level-four-container .password-input::placeholder {
    color: rgba(61, 37, 10, 0.6);
    font-family: "Pirata One", cursive;
    font-weight: 400;
    opacity: 1;
    font-size: 0.9em;
    letter-spacing: 3px;
}
#level-four-container .password-input + svg {
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    pointer-events: none;
}
#level-four-container .password-shadow {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 50px;
    left: 0;
    background: rgba(245, 234, 208, 0.8);

    border-radius: 70% 30% 30% 70% / 60% 40% 60% 40%;
    filter: blur(20px);
    pointer-events: none;
}
#level-four-container .hint {
    font-family: 'Pirata One', cursive;
    font-size: 3em;
    color: rgba(61, 37, 10, 0.90);
    margin-bottom: 0px;
    opacity: 0;
    transition: opacity 0.5s;
    cursor: default;
    text-shadow: 
        0 0 30px rgba(245, 234, 208, 0.95),
        0 0 55px rgba(245, 234, 208, 0.85),
        0 0 80px rgba(245, 234, 208, 0.75),
        2px 2px 4px rgba(61, 37, 10, 0.3);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}
#level-four-container .book-image-container {
    position: absolute;
    z-index: 1;
    padding: 20px;
}
#level-four-container .book-image-border {
    position: absolute;
    top: 6px;
    left: 3px;
    right: 3px;
    bottom: 6px;
    filter: url(#wavy2);
    box-shadow: 2px 3px 20px rgba(0, 0, 0, 0.2), 0 0 125px #8f5922 inset;
    pointer-events: none;
    border: 20px solid #f5ead0;
    z-index: 2;
}
#level-four-container .book-image {
    position: relative;
    display: block;
    z-index: 1;
}
#level-four-container .svg-filters {
    position: absolute;
    width: 0;
    height: 0;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}
#level-four-container .wrong-password-container {
    position: fixed;
    overflow: visible;
    pointer-events: none;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}
#level-four-container .wrong-password-annotation {
    width: 100%;
    height: 100%;
    position: relative;
}
#level-four-container .final-message {
    position: fixed;
    top: 40%;
    left: 0%;
    transform: translate(-50%, -50%);
    font-family: 'Pirata One', cursive;
    font-size: 5em;
    color: rgba(61, 37, 10, 0.90);
    transition: opacity 0.5s, transform 0.5s;
    z-index: 5;
    text-align: center;
    width: 100%;
}
#level-four-container .final-content {
    display: inline-block;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}
#level-four-container .message-line {
    margin: 10px 0;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}
#level-four-container .book-link {
    cursor: cell;
    color: #4a2408;
    margin-left: 5px;
}
#level-four-container .book-link:hover {
    color: #8f5922;
}
#level-four-container .cryptic-message {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}
#level-four-container .audio-btn,
.audio-popup-backdrop.theme-4 .audio-popup {
    --ac-color: rgba(61, 37, 10, 0.9);
    --ac-bg: rgba(225, 210, 175, 0.9);
    --ac-border-w: 8px;
    --ac-border-style: solid;
    --ac-glow: 0 0 15px rgba(61, 37, 10, 0.2);
    --ac-font: 'Cormorant Garamond', Georgia, serif;
    --ac-symbols: '✦ ⚜ ✦ ⚜';
}
.audio-popup-backdrop.theme-4 .audio-popup-title {
    font-family: 'Pirata One', serif;
    font-weight: 400;
}