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

body {
    font-family: 'Noto Sans', sans-serif;
    background: #000;
    overflow: hidden;
    cursor: none;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
}

#background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/gate.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: brightness(0.7);
}

#goal-container {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 15px 25px;
    border-radius: 10px;
    color: #fff;
    text-align: center;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

#goal-text {
    font-size: 1.2em;
    font-weight: bold;
}

#translate-button {
    background-color: #4CAF50;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.3s ease;
    font-family: inherit;
}

#translate-button:hover {
    background-color: #45a049;
}

#counter-display {
    font-size: 1.1em;
    color: #ffd700; /* Gold color for visibility */
}

#lives-display {
    font-size: 1.1em;
    color: #ff4d4d; /* Red color for lives */
    font-weight: bold;
}

#doors-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 60px;
    z-index: 2;
}

.door-container {
    position: relative;
    width: 200px;
    height: 400px;
}

.door-face {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    transition: transform 0.4s ease-in-out, filter 0.3s ease;
    transform-origin: left;
    filter: brightness(0.9);
    z-index: 2;
}

.door-face:hover {
    filter: brightness(1.1);
}

.door-face.opened {
    transform: scaleX(0);
}

.door-face img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.door-opening {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    z-index: 1;
    pointer-events: none; /* Not clickable until door is open */
}

.door-opening.active {
    cursor: pointer;
    pointer-events: auto;
}

#jumpscare {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: flash 0.5s ease-in-out;
}

#jumpscare.purapura-jumpscare {
    background: #000;
    animation: purapura-fade 4s forwards;
}

#jumpscare.purapura-jumpscare img {
    width: auto;
    height: auto;
    max-width: 80vw;
    max-height: 80vh;
    object-fit: contain;
    opacity: 1;
}

#jumpscare.yukie-jumpscare img,
#jumpscare.fullscreen-jumpscare img {
    width: 100vw;
    height: 100vh;
    object-fit: cover;
}

#jumpscare img {
    max-width: 80vw;
    max-height: 80vh;
    object-fit: contain;
}

.hidden {
    display: none !important;
}

/* --- Minigame Styles --- */
.minigame-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 100;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
}

/* Maze Game */
#maze-instructions {
    font-size: 1.5em;
    margin-bottom: 20px;
    color: #ff4d4d;
    text-shadow: 0 0 5px #ff0000;
}
#maze-grid {
    display: grid;
    border: 2px solid #555;
}
#surprise-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 3000;
    background: #000;
}
#redirect-embed {
    width: 100%;
    height: 100%;
    border: none;
}
.maze-cell {
    width: 40px;
    height: 40px;
}
.maze-path { background-color: #333; }
.maze-wall { background-color: #111; }
.maze-player { background-color: #4CAF50; border-radius: 50%; box-shadow: 0 0 10px #4CAF50; }
.maze-enemy {
    background-image: url('/Elizabeth.webp');
    background-size: cover;
    background-position: center;
    border-radius: 50%;
}
.maze-exit { background-color: #ffd700; box-shadow: 0 0 10px #ffd700;}

/* Cup Game */
#cup-instructions {
    font-size: 2em;
    margin-bottom: 40px;
}

#cups-wrapper {
    display: flex;
    gap: 50px;
}

.cup-container {
    position: relative;
    width: 150px;
    height: 200px;
}

.cup {
    width: 150px;
    height: 150px;
    background-image: url('cup.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    position: absolute;
    bottom: 0;
    cursor: pointer;
    transition: transform 0.3s ease-in-out, bottom 0.3s ease-in-out;
}

.cup:hover {
    transform: scale(1.05);
}

.cup.lifted {
    bottom: 100px;
}

.cup-content {
    width: 100px;
    height: 100px;
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
}

.cup-content img {
    max-width: 90%;
    max-height: 90%;
}

#start-shuffle-button {
    margin-top: 40px;
    padding: 15px 30px;
    font-size: 1.2em;
    background-color: #8B0000;
    color: white;
    border: 2px solid #ff0000;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#start-shuffle-button:hover {
    background-color: #B22222;
}

#game-over-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #ff0000;
    color: black;
    font-size: 5em;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    font-family: 'Times New Roman', Times, serif;
}

@keyframes flash {
    0% { opacity: 0; }
    10% { opacity: 1; background: #fff; }
    20% { background: #000; }
    100% { opacity: 1; background: #000; }
}

@keyframes purapura-fade {
    0% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (max-width: 768px) {
    #doors-container {
        flex-direction: column;
        gap: 30px;
    }
    
    .door-face {
        width: 150px;
        height: 300px; /* Made longer for mobile */
    }

    #goal-container {
        padding: 10px 15px;
        top: 10px;
    }

    #goal-text {
        font-size: 1em;
    }

    #translate-button {
        padding: 6px 10px;
        font-size: 0.8em;
    }

    #counter-display {
        font-size: 0.9em;
    }
}