body {
    background-color: #1e1e1e;
    color: white;
    margin: 0;
    font-family: 'Courier New', Courier, monospace;
    padding: 10px;
    min-height: 100vh;
    /* Ensure body takes at least the full viewport height */
    overflow: auto;
    /* Allow scrolling when content exceeds viewport height */
}

.centered-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.container {
    text-align: center;
    width: 100%;
    max-width: 400px;
    padding: 40px;
    margin-bottom: 120px;
    /* Ensure there's enough space for the language buttons */
    box-sizing: border-box;
    /* Include padding and border in the element's total width and height */
}


.topbar-right {
    display: flex;
    align-items: center;
}

/* Make .dropbtn visually match .topbar-right a */
.dropbtn {
    color: white;
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    text-decoration: none;
    font-size: 1em;
    background: none;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    padding: 0;
}

.dropbtn:hover {
    color: #ddd;
    text-decoration: underline;
}

.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #2e2e2e;
    min-width: 160px;
    z-index: 1;
    border: 1px solid #444;
}

.dropdown-content a {
    color: white;
    padding: 10px 14px;
    text-decoration: none;
    display: block;
    font-family: 'Courier New', Courier, monospace;
}

.dropdown-content a:hover {
    background-color: #3a3a3a;
}

.dropdown-content a::before {
    content: '';
    display: inline-block;
    width: 1em;
    margin-right: 8px;
    visibility: hidden;
}

.dropdown-content a:hover::before {
    content: '>';
    visibility: visible;
    color: #ccc;
}


.dropdown:hover .dropdown-content {
    display: block;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.pagination button {
    padding: 6px 12px;
    background-color: #2e2e2e;
    color: white;
    border: 1px solid #555;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
    width: auto;
    min-width: 36px;
}

.pagination button:hover {
    background-color: #3a3a3a;
    border-color: #888;
}

.pagination button.active {
    background-color: #555;
    border-color: #aaa;
    font-weight: bold;
}


input[type="text"],
input[type="password"] {
    padding: 10px;
    margin: 10px 0;
    width: 100%;
    max-width: 300px;
    border: 2px solid #fff;
    border-radius: 4px;
    background: #3b3b3b;
    color: white;
    font-family: 'Courier New', Courier, monospace;
}

button {
    padding: 10px 20px;
    background-color: #555;
    color: white;
    border: 2px solid #fff;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    width: 100%;
    max-width: 300px;
    margin: 10px 0;
}

button.small-button {
    padding: 6px 14px;
    /* smaller padding */
    font-size: 0.85em;
    /* slightly smaller text */
    max-width: 150px;
    /* narrower button */
    width: auto;
    /* allow the button to shrink to content if needed */
    margin: 5px 0;
    /* slightly smaller margin */
}

button:hover {
    background-color: #444;
}

textarea {
    width: 100%;
    max-width: 1000px;
    height: 500px;
    padding: 10px;
    margin: 10px 0;
    border: 2px solid #fff;
    border-radius: 4px;
    background: #3b3b3b;
    color: white;
    font-family: 'Courier New', Courier, monospace;
    resize: none;
    display: block;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

.guest-button {
    margin-top: 20px;
    font-size: 14px;
}

.error-message {
    color: red;
    margin-top: 10px;
    font-size: 14px;
}

.ascii-cat {
    position: fixed;
    color: white;
    font-family: 'Courier New', Courier, monospace;
    pointer-events: none;
    user-select: none;
    z-index: 9999;
    transition: transform 0.5s ease-out, opacity 0.5s ease-out;
    opacity: 1;
    white-space: pre;
    display: inline-block;
    line-height: 1.1;
    transform: rotate(calc(360deg * var(--rand-rot))) scale(calc(0.5 + var(--rand-scale)));
}


.header {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 20px;
    color: white;
}

.about {
    font-size: 16px;
    margin-bottom: 30px;
    line-height: 1.6;
    color: white;
    width: 80%;
    max-width: 600px;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.image-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.image-container img {
    width: 200px;
    height: auto;
}

.loading-image-container {
    display: flex;
    justify-content: center;
}

.loading-image-container img {
    width: 40px;
    height: auto;
}

.disclosure-group {
    width: 80%;
    max-width: 600px;
    margin-bottom: 20px;
    margin-left: auto;
    margin-right: auto;
}

.disclosure-group summary {
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 10px;
    color: white;
}

.disclosure-group details {
    background-color: #2e2e2e;
    padding: 10px;
    border: 1px solid white;
}

.disclosure-group p {
    font-size: 14px;
    line-height: 1.6;
    margin: 10px 0;
    color: white;
}

details[open] {
    display: block;
}

a {
    color: white;
}

a:hover {
    text-decoration: underline;
    color: #ddd;
}

.language-buttons {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;            orderBy,
} from "https://www.gstatic.com/firebasejs/10.12.0/firebase-firestore.js";
    padding: 8px 16px;
    background-color: #555;
    color: white;
    border: 2px solid #fff;
    cursor: pointer;
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    max-lines: 1;
    text-decoration: none;
    border-radius: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.language-buttons a:hover {
    background-color: #444;
}

.language-buttons a.active {
    background-color: #777;
}

@media (max-width: 600px) {
    body {
        padding: 20px;
    }

    .container {
        padding: 15px;
    }

    input[type="text"],
    input[type="password"],
    button {
        font-size: 1em;
    }

    .guest-button {
        font-size: 1em;
    }

    .error-message {
        font-size: 1em;
    }
}

.topbar {
    width: 100%;
    background-color: #2e2e2e;
    padding: 10px 20px;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.topbar-left button {
    background-color: #800;
    color: white;
    border: 2px solid white;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
    padding: 6px 14px;
    cursor: pointer;
}

.topbar-right a {
    color: white;
    margin-left: 20px;
    text-decoration: none;
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
}

.topbar-right a:hover {
    text-decoration: underline;
    color: #ddd;
}