/* ==========================================
   Generic Popup
========================================== */

.popup {
    display: none;

    position: fixed;
    inset: 0;

    z-index: 1000;

    justify-content: center;
    align-items: center;

    background: rgba(0, 0, 0, 0.5);
}

.popup.open {
    display: flex;
}

.success-message,
.error-message {
    display: none;
}

.success-message.show,
.error-message.show {
    display: block;
}

.popup-content {
    max-width: 300px;

    padding: 20px;

    text-align: center;

    background: white;

    border-radius: var(--radius-medium);

    box-shadow: var(--shadow-medium);
}

.popup-content p {
    margin-bottom: 20px;

    color: green;
}

.popup-content button {
    width: 100%;
}

/* ==========================================
   Game Modal
========================================== */

#game-modal {
    display: none;

    position: fixed;
    inset: 0;

    z-index: 1000;

    justify-content: center;
    align-items: center;

    background: rgba(0, 0, 0, 0.7);
}

#game-modal.open{
    display:flex;
}

#game-modal-content {
    position: relative;

    display: flex;
    flex-direction: column;
    align-items: center;

    margin: auto;
    padding: 0;

    max-width: 750px;

    background: white;

    border-radius: var(--radius-large);

    box-shadow: var(--shadow-large);
}

/* ==========================================
   Game Information Panel
========================================== */

#game-info-modal {
    position: absolute;

    
    left: 50%;

    transform: translateX(-50%);

    z-index: 1100;

    display: block;

    width: 750px;

    padding: 12px 32px 10px;

    background: white;

    border-radius: var(--radius-medium);

    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

#modal-title {
    margin-top: 0;
    margin-bottom: 8px;

    text-align: center;

    font-size: 1em;
    line-height: 1.2;
}

#modal-description {
    margin-bottom: 12px;

    text-align: center;

    font-size: 0.85em;
    line-height: 1.5;
}

#game-info-modal > div {
    display: flex;
    justify-content: center;
    gap: 12px;

    margin-top: 0;
}

.modal-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;

    margin-top: 0;
}

/* ==========================================
   Three.js Viewer
========================================== */

#modal-viewer {
    position: relative;

    z-index: 1000;

    width: 750px;
    height: 750px;

    margin: 80px auto 0;
}