@font-face {
    font-family: 'AnglosaxonRunes';
    src: url('/static/font/AnglosaxonRunes-VGne.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

body {
    margin: 0;
    background-image: url('/static/img/gandalf-at-door.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100vh;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    padding: 20px;
    padding-top: 25vh;
    box-sizing: border-box;
}

h1 {
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

#door-status {
    opacity: 1;
    visibility: visible;
    transition: opacity 2s ease-in-out, visibility 0s linear 2s;
}

#door-status.is-fading-out {
    opacity: 0;
    visibility: hidden;
}

h2 {
    color: #ffffff;
}

.runes {
    font-family: 'AnglosaxonRunes', Arial, sans-serif;
}

#key-display {
    margin-top: 20px;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid #ccc;
    border-radius: 4px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease-in-out, visibility 0s linear 0.2s;
}

#key-display.visible {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.2s ease-in-out, visibility 0s linear 0s;
}

#key-display.is-fading-out {
    opacity: 0;
    transition: opacity 3s ease-in-out, visibility 0s linear 3s;
}

#pressed-key {
    font-weight: bold;
    color: #ffc107;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 10px rgba(40, 167, 69, 0.5);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 20px rgba(40, 167, 69, 0.8);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 10px rgba(40, 167, 69, 0.5);
    }
}

#protected-link {
    display: none;
    margin-top: 20px;
    padding: 10px 15px;
    font-size: 1em;
    color: white;
    background-color: #28a745;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    animation: pulse 2s infinite;
}

#protected-link:hover {
    background-color: #218838;
}

#mobile-form {
    margin-top: 20px;
    display: none; /* XXX: Initially hidden, JS will display it for mobile */
}

#mobile-form label {
    color: white;
}

#mobile-input {
    margin-right: 10px;
}

.error-message {
    margin-top: 20px;
    padding: 15px;
    background-color: rgba(220, 53, 69, 0.9);
    border: 2px solid #dc3545;
    border-radius: 4px;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    max-width: 600px;
    word-wrap: break-word;
}

footer {
    color: #fff;
    padding: 10px 0;
    text-align: right;
    width: 100%;
    margin-top: auto;
    box-sizing: border-box;
    font-size: 0.9em;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.footer-content p {
    margin: 0 0 10px 0;
}

.social-links a {
    color: #fff;
    margin: 0 12px;
    font-size: 1.8em;
    text-decoration: none;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #ffc107;
}

/* Adjust padding-top for mobile devices */
@media (max-width: 768px) {
    body {
        padding-top: 10vh;
    }
}

