
#info-btn {
    position: absolute;
    right: 50%;
    transform: translateX(calc(-75% ));
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    /* kill the bottom:10% so we can drive it from JS */
    bottom: auto;
    background-color: #0077ff;
    border: 1px solid black;
    border-radius: 8px;
    padding: 0px 20px 0px 20px;
    height: 3rem;
    font-size: 1.5rem;
    cursor: pointer;
    width: 9rem;
}


#info-btn {
    transition: opacity 0.3s, transform 1.3s;
}

#info-btn.disabled {
    background-color: #0077ff;
    color: white;
    animation: none;
}

#info-btn.highlight {
    background-color: #4CAF50;
    color: white;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: translateX(calc(-75%)) scale(1);
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
    }
    70% {
        transform: translateX(calc(-75%))  scale(1.05);
        box-shadow: 0 0 10px 10px rgba(76, 175, 80, 0);
    }
    100% {
        transform: translateX(calc(-75%)) scale(1);
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
    }
}

#info-btn-img {
    scale: 0.8;
}

.menu {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9); /* Black with opacity */
    color: white;
    z-index: 1000;
    overflow: auto;
    padding: 50px;
    font-family: Rockwell;
}

.menu-content {
    margin-top: 100px;
    text-align: center;
    font-size: 20px;
}

#infoTitle {
    text-align: center;
    margin-bottom: 0.5rem;  /* Abstand nach unten verkleinern */
    margin-top: 1rem;       /* Optional: Abstand nach oben etwas */
    font-size: 2rem;      /* etwas größer für Sichtbarkeit */
    font-weight: bold;
}

#closeInfoButton {
    position: absolute;
    top: 20px;
    right: 40px;
    font-size: 30px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-family: Rockwell;
}

#fullscreenMenu {
    display: none;
    flex-direction: column;
    align-items: center;   /* <-- this horizontally centers all children */
    padding: 2rem;
    overflow-y: auto;
}

.glossary-btn {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: #0077ff;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-family: Rockwell;
}
.glossary-btn:hover {
    background: #005ccc;
}

.glossary-mode {
    background: #0077ff !important;
    color: white;
}

#fullscreenMenu img {
    display: block;
    margin: 0.5rem auto;             /* <-- centers image with equal margins */
    max-width: 90vw;
    max-height: 60vh;
    width: auto;
    height: auto;
    object-fit: contain;
    box-sizing: border-box;
}

#fullscreenMenu pre {
    white-space: pre-wrap;   /* wrap long lines */
    word-wrap: break-word;   /* force-break long words if needed */
    max-width: 90vw;         /* match image limit */
    margin: 1rem auto;
    font-family: inherit;
}


#info-glossary {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.9);
    z-index: 10000;
    overflow-y: auto;
    padding: 2rem;
    color: white;
    font-family: Rockwell;
}

#glossary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
    font-family: Rockwell;
}

.glossary-card {
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    font-family: Rockwell;
}

.glossary-card:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(255,255,255,0.3);
}

.glossary-card img {
    max-width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: 6px;
}

.glossary-card h3 {
    margin-top: 0.5rem;
    font-size: 1rem;
}

#closeGlossary {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 1.2rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s ease;
    font-family: Rockwell;
}

#closeGlossary:hover {
    background: rgba(255,255,255,0.4);
}


@media (max-width: 768px) {
    #info-btn {
        transform: translateX(-77%);
        padding: 0px 20px 0px 10px;
        height: 2.3rem;
        font-size: 1rem;
        width: 5.5rem;
    }
    #info-btn-img {
        scale: 0.7;
        margin-right: -10px;
    }
    @keyframes pulse {
        0% {
            transform: translateX(calc(-77%)) scale(1);
            box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
        }
        70% {
            transform: translateX(calc(-77%))  scale(1.05);
            box-shadow: 0 0 10px 10px rgba(76, 175, 80, 0);
        }
        100% {
            transform: translateX(calc(-77%)) scale(1);
            box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
        }
    }
}