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

body {
    font-family: 'Arial', sans-serif;
    background: black;
    height: 100vh;
    overflow: hidden;
}

.title-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: black;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.5s ease;
}

.title-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.game-title {
    font-family: "old-man-eloquent", sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 80px;
    color: white;
    margin-bottom: 60px;
}

.start-button {
    background: #000000;
    color: rgb(255, 255, 255);
    border: 0.25px solid white;
    padding: 5px 80px;
    font-family: "edu-nsw-act-hand-precursive", sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.start-button:hover {
    background: #ddd;
    color: black;
}

.black-screen {
    position: fixed;
    top: 10%;
    left: 29%;
    width: 100%;
    height: 100vh;
    background: black;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1.5s ease;
}

.black-screen img {
    display: flex;
    justify-content: center;
    top: 70%;
    height: 80%;
    object-fit: cover;
}

.black-screen.active {
    opacity: 1;
}

.game-container {
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.image-container {
    position: relative;
    height: 100vh;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.game-image {
    max-height: 100vh;
    max-width: 100vw;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

.fade-out {
    opacity: 0;
}

/* UPDATED: Hotspots container now positioned relative to image */
.hotspots-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    /* Width and height will be set dynamically by JavaScript to match displayed image size */
}

.hotspot {
    position: absolute;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0) 90%);
    border: 2px solid rgba(255, 255, 255, 0);
    border-radius: 50%;
    transition: all 0.3s ease;
    pointer-events: auto;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2),
                inset 0 0 15px rgba(255, 255, 255, 0.1);
    animation: pulse-glow 3s ease-in-out infinite;
}

.hotspot:hover {
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 90%);
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 30px rgba(100, 200, 255, 0.5),
                inset 0 0 20px rgba(100, 200, 255, 0.2);
    transform: scale(1.05);
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.2),
                    inset 0 0 15px rgba(255, 255, 255, 0.1);
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 255, 255, 0.3),
                    inset 0 0 20px rgba(255, 255, 255, 0.15);
    }
}

.debug-mode .hotspot {
    background: rgba(255, 0, 0, 0.2);
    border: 2px solid rgba(255, 0, 0, 0.5);
    z-index: 10;
}

.inventory {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 25px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-family: "consolas", sans-serif;
    font-size: 14px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    z-index: 100;
}

.inventory-title {
    font-weight: bold;
    margin-bottom: 5px;
}

.debug-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 10px 20px;
    background: rgba(255, 0, 0, 0.7);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 12px;
    z-index: 100;
}

.audio-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    font-size: 24px;
    z-index: 100;
    border-radius: 50%;
    transition: background 0.2s;
}

.audio-toggle:hover {
    background: rgba(50, 50, 50, 0.9);
}

.audio-toggle.muted {
    opacity: 0.5;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.50);
    z-index: 500;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.overlay.active {
    display: flex;
    opacity: 1;
}

.overlay-image {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
}

.mouse-position {
    position: fixed;
    top: 60px;
    right: 20px;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.8);
    color: #0f0;
    border: 1px solid rgba(0, 255, 0, 0.5);
    font-family: "consolas", monospace;
    font-size: 12px;
    z-index: 100;
    display: none;
}

.mouse-position.active {
    display: block;
}

.mouse-position div {
    margin: 2px 0;
}

/* PASSWORD NUMBER PAD WITH IMAGE STYLES */
.password-overlay {
    background: rgba(0, 0, 0, 0.95);
}

.password-overlay.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.numberpad-container {
    position: relative;
    width: auto;
    height: auto;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.numberpad-image {
    width: 100%;
    height: 100%;
    max-width: 600px;
    max-height: 80vh;
    object-fit: contain;
    display: block;
}

.password-display-overlay {
    position: absolute;
    top: 17.5%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    padding: 2px 20px;
    font-size: 22px;
    font-family: "consolas", monospace;
    color: #0f0;
    letter-spacing: 12px;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.7);
    border-radius: 5px;
    z-index: 10;
}

.password-display-overlay.shake {
    animation: shake 0.5s;
    border-color: #f00;
    color: #f00;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.7);
}

.password-display-overlay.success {
    border-color: #0f0;
    color: #0f0;
    animation: glow 0.5s;
}

/* Number Pad Grid */
.numpad-grid {
    position: absolute;
    top: 28%;
    left: 49%;
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 12px;
    width: 35%;
    height: 5%;
    z-index: 5;
}

.numpad-controls {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    padding: 20px;
    border: 2px solid rgba(0, 255, 0, 0.5);
    border-radius: 10px;
    color: #0f0;
    font-family: "consolas", monospace;
    font-size: 12px;
    z-index: 1000;
    display: none !important;  /* Added !important */
    flex-direction: column;
    gap: 10px;
    min-width: 400px;
}

/* Remove or comment out this rule */
/*
.password-overlay.active .numpad-controls {
    display: flex;
}
*/

.password-overlay.active .numpad-controls {
    display: flex;
}

.numpad-control-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.numpad-control-row label {
    min-width: 80px;
}

.numpad-control-row input {
    flex: 1;
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid rgba(0, 255, 0, 0.3);
    color: #0f0;
    padding: 5px;
    font-family: "consolas", monospace;
}

.numpad-control-row button {
    background: rgba(0, 255, 0, 0.2);
    border: 1px solid rgba(0, 255, 0, 0.5);
    color: #0f0;
    padding: 5px 10px;
    cursor: pointer;
    font-family: "consolas", monospace;
}

.numpad-control-row button:hover {
    background: rgba(0, 255, 0, 0.4);
}

.numpad-controls-code {
    margin-top: 10px;
    padding: 10px;
    background: rgba(0, 255, 0, 0.05);
    border: 1px solid rgba(0, 255, 0, 0.3);
    font-size: 10px;
    word-wrap: break-word;
    max-height: 100px;
    overflow-y: auto;
}

.numpad-btn {
    background: radial-gradient(circle, rgba(0, 255, 0, 0.1) 0%, rgba(0, 255, 0, 0) 70%);
    border: 2px solid rgba(0, 255, 0, 0);
    color: transparent;
    font-size: 24px;
    font-family: "consolas", monospace;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.1),
                inset 0 0 10px rgba(0, 255, 0, 0.05);
    animation: pulse-glow-green 3s ease-in-out infinite;
}

.numpad-btn:hover {
    background: radial-gradient(circle, rgba(0, 255, 0, 0.3) 0%, rgba(0, 255, 0, 0) 70%);
    border: 2px solid rgba(0, 255, 0, 0.4);
    box-shadow: 0 0 25px rgba(0, 255, 0, 0.4),
                inset 0 0 15px rgba(0, 255, 0, 0.2);
    transform: scale(1.1);
}

.numpad-btn:active {
    background: radial-gradient(circle, rgba(0, 255, 0, 0.5) 0%, rgba(0, 255, 0, 0) 70%);
    box-shadow: 0 0 35px rgba(0, 255, 0, 0.6),
                inset 0 0 20px rgba(0, 255, 0, 0.3);
    transform: scale(0.95);
}

@keyframes pulse-glow-green {
    0%, 100% {
        box-shadow: 0 0 15px rgba(0, 255, 0, 0.1),
                    inset 0 0 10px rgba(0, 255, 0, 0.05);
    }
    50% {
        box-shadow: 0 0 20px rgba(0, 255, 0, 0.15),
                    inset 0 0 12px rgba(0, 255, 0, 0.08);
    }
}

/* Show button text in debug mode */
.debug-mode .numpad-btn {
    background: rgba(255, 0, 0, 0.3);
    border: 2px solid rgba(255, 0, 0, 0.8);
    color: white;
}

@keyframes shake {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-50%) translateY(-10px); }
    20%, 40%, 60%, 80% { transform: translateX(-50%) translateY(5px); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 10px rgba(0, 255, 0, 0.5); }
    50% { box-shadow: 0 0 30px rgba(0, 255, 0, 1); }
}

/* Ending Text Overlay */
.ending-text-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    pointer-events: none;
    z-index: 5;
}

.ending-title {
    font-family: "old-man-eloquent", sans-serif;
    font-size: 80px;
    margin-bottom: 40px;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    animation: fadeIn 1s ease-in;
}

.ending-message {
    font-family: "edu-nsw-act-hand-precursive", sans-serif;
    font-size: 28px;
    max-width: 800px;
    line-height: 1.6;
    margin-bottom: 60px;
    animation: fadeIn 1.5s ease-in;
}

.ending-button {
    font-family: "consolas", sans-serif;
    font-size: 24px;
    padding: 15px 50px;
    border: 2px solid white;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    pointer-events: auto;
    animation: fadeIn 2s ease-in, pulse 2s ease-in-out infinite;
    transition: all 0.3s;
    z-index: 0;
}

.ending-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
    z-index: 0;
}

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

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 10px rgba(255, 255, 255, 0.3); }
    50% { box-shadow: 0 0 25px rgba(255, 255, 255, 0.6); }
}

/* PRODUCTION MODE - Hide all debug elements */
.debug-toggle,
.mouse-position,
.inventory {
    display: none !important;
}

/* OPTIONAL: Remove glow effects in production by uncommenting these lines */
/*
.hotspot {
    background: rgba(255, 255, 255, 0) !important;
    border: 2px solid rgba(255, 255, 255, 0) !important;
    box-shadow: none !important;
    animation: none !important;
}

.hotspot:hover {
    background: rgba(255, 255, 255, 0) !important;
    border: 2px solid rgba(255, 255, 255, 0) !important;
    box-shadow: none !important;
    transform: none !important;
}

.numpad-btn {
    background: rgba(0, 255, 0, 0) !important;
    border: 2px solid rgba(0, 255, 0, 0) !important;
    box-shadow: none !important;
    animation: none !important;
}

.numpad-btn:hover {
    background: rgba(0, 255, 0, 0) !important;
    border: 2px solid rgba(0, 255, 0, 0) !important;
    box-shadow: none !important;
}
*/