body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background: #f5f5e5;
    overflow: visible;
    min-height: 100vh;
    position: relative;
    user-select: none;
}
.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 100vh;
    margin-top: 0;
    position: relative;
}
.logo-container {
    position: relative;
    width: 200px;
    height: 168px;
    margin: 25vh auto 0;
    z-index: 0;
    cursor: pointer;
    pointer-events: auto;
}
.logo {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}
.cloak {
    position: absolute;
    width: 200px;
    height: 168px;
    z-index: 1600;
}
.book {
    position: absolute;
    width: 20px;
    height: 30px;
    z-index: 1500;
    cursor: pointer;
    touch-action: manipulation;
    pointer-events: auto;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}
h1 {
    font-size: 1.5em;
    margin: 20px 0;
}
#coming-soon {
    margin-top: 80px;
    z-index: 0;
}
#coming-soon.active {
    pointer-events: none;
}
#coming-soon h3 {
    font-size: 1.2em;
    margin: 10px 0;
}
#coming-soon p {
    font-size: 1em;
    margin: 5px 0;
}
#coming-soon .instruction {
    color: #FFA500 !important;
}
#scoreboard {
    font-size: 1em;
    color: #333;
    background: rgba(255, 255, 255, 0.8);
    padding: 5px 10px;
    border-radius: 5px;
    margin-bottom: 10px;
    z-index: 0;
    pointer-events: auto;
}
#enter-umbercloak {
    font-size: 1em;
    color: #000;
    background: #f5f5dc;
    border: 2px solid #000;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    position: absolute;
    top: calc(25vh + 168px + 40px + 1.5em + 20px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    pointer-events: auto;
}
#enter-umbercloak:hover {
    background: #e0e0b0;
}
#transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 4000;
    pointer-events: none;
}
.text-cascade {
    display: inline-block;
    animation: fallAndFade 1.5s ease-out forwards;
}
@keyframes fallAndFade {
    0% {
        opacity: 1;
        transform: translateY(0) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translateY(100vh) rotate(360deg);
    }
}
body.fade-out {
    animation: crossFade 2s ease-out forwards;
}
@keyframes crossFade {
    to {
        opacity: 0;
    }
}
.logo-container.shrink-away {
    animation: shrink 2s ease-out forwards;
}
@keyframes shrink {
    to {
        transform: scale(0);
        opacity: 0;
    }
}
#level-up {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 5em !important;
    color: #0000FF !important;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    z-index: 2000;
}
#game-over {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10em !important;
    color: #a52a2a !important;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    z-index: 3000;
    text-align: center;
}
.hidden {
    display: none !important;
}
@keyframes wiggle {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(5deg); }
    50% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
    100% { transform: rotate(0deg); }
}
@keyframes fadeOut {
    0% { opacity: 1; }
    40% { opacity: 1; }
    100% { opacity: 0; }
}
@keyframes explode {
    0% {
        transform: scale(1);
        opacity: 1;
        background: radial-gradient(circle, #ff4500 0%, transparent 70%);
    }
    100% {
        transform: scale(3);
        opacity: 0;
        background: radial-gradient(circle, #ff4500 0%, transparent 70%);
    }
}
@-webkit-keyframes explode {
    0% {
        -webkit-transform: scale(1);
        opacity: 1;
        background: radial-gradient(circle, #ff4500 0%, transparent 70%);
    }
    100% {
        -webkit-transform: scale(3);
        opacity: 0;
        background: radial-gradient(circle, #ff4500 0%, transparent 70%);
    }
}
@keyframes flashRed {
    0% { background-color: #f5f5e5; }
    50% { background-color: #ff0000; }
    100% { background-color: #f5f5e5; }
}
@keyframes logoFadeIn {
    0% { opacity: 0; transform: scale(0.5); }
    100% { opacity: 1; transform: scale(1); }
}
@media screen and (max-width: 600px) {
    .logo-container {
        width: 160px;
        height: 134.4px;
        margin: 15vh auto 0;
        z-index: 0;
    }
    .cloak {
        width: 160px;
        height: 134.4px;
        z-index: 1600;
    }
    .book {
        width: 15px;
        height: 22.5px;
        z-index: 1500;
    }
    #game-over {
        font-size: 6em !important;
    }
    #enter-umbercloak {
        top: calc(15vh + 134.4px + 100px + 1.2em);
    }
}
@media (prefers-reduced-motion: reduce) {
    .text-cascade {
        animation: none !important;
    }
    body.fade-out {
        animation: none !important;
        opacity: 0;
    }
    .logo-container.shrink-away {
        animation: none !important;
        transform: scale(0);
        opacity: 0;
    }
}