@font-face {
    font-family: "Vazir";
    src: url("./Vazirmatn-Medium.ttf");
  }

body {
    margin: 0;
    overflow: hidden; 
    display: flex;
    justify-content: center; 
    align-items: center; 
    min-height: 100vh; 
    background-color: #2a2a2a; 
    font-family: 'Courier Prime', monospace; 
    color: white;
    font-family: Vazir;
}


#game-container {
    width: 50vh; 
    height: 98vh; 
    margin-top: 1vh ;
    background-color: black;
    border-radius: 30px;
    position: relative; 
    overflow: hidden; 
    display: flex;
    flex-direction: column; 
    justify-content: space-between; 
    align-items: center; 
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5); 
}


@media (max-width: 768px) {
    #game-container {
        width: 100vw; 
        height: 100dvh;
        margin-top: 0;
        border-radius: 0;
    }
}

#image-display {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

#center-image {
    max-width: 100%;
    max-height: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    box-sizing: border-box;
    opacity: 0;

    
    opacity: 1; 
    transition: opacity 0.5s ease-in-out; 
}


#center-image.fade-out {
    opacity: 0;
}


#text-box {
    width: 100%;
    min-height: 250px; 
    background-color: rgba(0, 0, 0, 0.8); 
    text-align: right;
    direction: rtl;
    color: white;
    padding: 20px;
    box-sizing: border-box; 
    font-size: 1.1em;
    line-height: 1.5;
    overflow-y: auto; 
    border-top: 2px solid limegreen; 
}

#dialogue-text {
    white-space: pre-wrap; 
    margin: 0; 
    animation: fadeInText .5s forwards; 
}


#dialogue-text::after {
    content: '|'; 
    opacity: 1;
    animation: blink-caret .75s infinite alternate;
}

#text-box.typing-finished #dialogue-text::after {
    opacity: 0;
    animation: none;
}

#note{
    visibility: hidden;
    background-color: rgba(0, 0, 0, 0.7);
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#note .image{
    width: 90%;
    height: auto;
}

@keyframes blink-caret {
    from { opacity: 1; }
    to { opacity: 0; }
}