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

body {
    background-color: #0a0a0a;
    color: #e0e0e0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    font-family: 'Times New Roman', serif;
}

.container {
    text-align: center;
    width: 100%;
    max-width: 1000px;
    padding: 25px;
    position: relative;
    z-index: 2;
}

.door-container {
    position: relative;
    width: 375px;
    height: 625px;
    margin: 0 auto;
}

.door {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0.9) sepia(0.1);
    position: relative;
    z-index: 2;
}

.door-knob {
    position: absolute;
    top: 373.6px;
    left: 252.5px;
    width: 25px;
    height: 25px;
    object-fit: contain;
    cursor: pointer;
    z-index: 3;
    transform-origin: right center;
}

.door-glow {
    position: absolute;
    bottom: 7.5px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    height: 37.5px;
    background: rgba(80, 80, 120, 0.4);
    border-radius: 50%;
    filter: blur(18.75px);
    z-index: 1;
    animation: glow-pulse 3s infinite alternate;
}

@keyframes glow-pulse {
    0% {
        opacity: 0.3;
        box-shadow: 0 0 25px 6.25px rgba(80, 80, 120, 0.3);
    }
    100% {
        opacity: 0.6;
        box-shadow: 0 0 37.5px 12.5px rgba(80, 80, 120, 0.5);
    }
}

.key-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.key-popup.active {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    background: #1a1a1a;
    border: 3.75px solid #8b7355;
    border-radius: 10px;
    padding: 37.5px;
    width: 90%;
    max-width: 500px;
    position: relative;
    transform: scale(0.7);
    transition: transform 0.3s ease;
}

.key-popup.active .popup-content {
    transform: scale(1);
}

.popup-header {
    text-align: center;
    margin-bottom: 31.25px;
}

.popup-header h3 {
    color: #d4af37;
    font-size: 1.75rem;
    letter-spacing: 3.75px;
    text-transform: uppercase;
    margin-bottom: 12.5px;
    text-shadow: 0 0 12.5px rgba(212, 175, 55, 0.3);
}

.popup-border {
    height: 2.5px;
    background: linear-gradient(90deg, transparent, #d4af37, transparent);
    margin: 0 auto;
}

.popup-body {
    margin-bottom: 25px;
}

.instruction {
    color: #b8b8b8;
    font-size: 1.25rem;
    margin-bottom: 25px;
    text-align: center;
    font-style: italic;
}

.input-group {
    margin-bottom: 31.25px;
    position: relative;
}

.popup-input {
    width: 100%;
    padding: 15px 18.75px;
    background: #2a2a2a;
    border: 2.5px solid #8b7355;
    border-radius: 5px;
    color: #e0e0e0;
    font-size: 1.375rem;
    font-family: 'Times New Roman', serif;
    text-align: center;
    letter-spacing: 2.5px;
    outline: none;
    transition: all 0.3s ease;
}

.popup-input:focus {
    border-color: #d4af37;
    box-shadow: 0 0 12.5px rgba(212, 175, 55, 0.3);
}

.input-underline {
    height: 1.25px;
    background: linear-gradient(90deg, transparent, #8b7355, transparent);
    margin-top: 6.25px;
    opacity: 0.7;
}

.popup-button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(to bottom, #8b7355, #6b5a45);
    border: 2.5px solid #d4af37;
    border-radius: 5px;
    color: #fff;
    font-size: 1.25rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1.25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Times New Roman', serif;
}

.popup-button:hover {
    background: linear-gradient(to bottom, #9c8363, #7b6a55);
}

.popup-footer {
    text-align: center;
}

.message {
    min-height: 30px;
    font-size: 1.125rem;
    color: #d4a0a0;
    opacity: 0;
    transition: opacity 0.3s;
    font-style: italic;
}

.message.show {
    opacity: 1;
}

@keyframes wiggle {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(8deg); }
    50% { transform: rotate(-6deg); }
    75% { transform: rotate(4deg); }
    100% { transform: rotate(0deg); }
}

.wiggle {
    animation: wiggle 0.4s ease;
}

@media (max-width: 600px) {
    .door-container {
        width: 312.5px;
        height: 500px;
    }
    
    .popup-content {
        padding: 25px;
        margin: 25px;
    }
}