body {
    margin: 0;
    padding: 0;
    background-color: #111;
    color: #eee;
    font-family: 'Courier New', Courier, monospace;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
}

#game-container {
    position: relative;
    width: 1024px;
    height: 576px;
    /* 16:9 aspect ratio */
    background-color: #000;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
}

#background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Interactive Objects */
#obj-lock {
    position: absolute;
    width: 60px;
    height: auto;
    bottom: 20%;
    left: 15%;
    cursor: pointer;
    transition: transform 0.2s, filter 0.2s;
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.5));
}

#obj-lock:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.6));
}

#obj-hint {
    position: absolute;
    width: 50px;
    height: auto;
    bottom: 25%;
    right: 20%;
    cursor: pointer;
    transition: transform 0.2s;
    transform: rotate(10deg);
}

#obj-hint:hover {
    transform: rotate(10deg) scale(1.1);
}

#zone-door {
    position: absolute;
    top: 20%;
    left: 40%;
    width: 20%;
    height: 50%;
    cursor: pointer;
    /* border: 1px solid rgba(255, 255, 255, 0.1); Optional: subtle hint */
}

#zone-door:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Inventory */
#inventory-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    padding: 0 20px;
    box-sizing: border-box;
    border-top: 2px solid #444;
    z-index: 50;
}

#inventory-bar h3 {
    margin-right: 20px;
    color: #aaa;
}

#inventory-slots {
    display: flex;
    gap: 10px;
}

.inventory-item {
    width: 60px;
    height: 60px;
    border: 1px solid #666;
    background: #222;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.inventory-item img {
    max-width: 50px;
    max-height: 50px;
}

.inventory-item.selected {
    border-color: #d4af37;
    box-shadow: 0 0 10px #d4af37;
}

/* Modals */
#modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.modal-content {
    background: #222;
    padding: 30px;
    border: 2px solid #555;
    border-radius: 8px;
    text-align: center;
    max-width: 80%;
    color: #fff;
}

.hidden {
    display: none !important;
}

.puzzle-image,
.hint-image {
    max-width: 400px;
    display: block;
    margin: 0 auto 20px;
    border: 2px solid #444;
}

.handwriting {
    font-family: 'Brush Script MT', cursive;
    font-size: 1.5em;
    color: #e0c097;
}

input[type="text"] {
    padding: 10px;
    font-size: 1.2em;
    text-align: center;
    margin-bottom: 10px;
    background: #333;
    border: 1px solid #555;
    color: #fff;
}

button {
    padding: 10px 20px;
    font-size: 1em;
    cursor: pointer;
    background: #444;
    color: #fff;
    border: none;
    margin: 5px;
}

button:hover {
    background: #666;
}

/* Message Area */
#message-area {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    padding: 15px 30px;
    border-radius: 20px;
    font-size: 1.2em;
    pointer-events: none;
    animation: fadeInOut 3s forwards;
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

/* Success Screen */
#success-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('assets/success.png') no-repeat center center;
    background-size: cover;
    z-index: 200;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 2s forwards;
}

.success-content {
    background: rgba(0, 0, 0, 0.6);
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    color: #fff;
    border: 2px solid #fff;
}

.success-content h1 {
    font-size: 3em;
    margin-bottom: 20px;
    color: #ffd700;
    text-shadow: 0 0 10px #ffd700;
}

.success-content p {
    font-size: 1.2em;
    margin-bottom: 30px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}