/* "ABOUT" OVERLAY STYLES */
/* Update the main overlay to ensure it behaves as a full-screen flex container */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 1);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Prevent the overlay itself from scrolling */
}

.overlay.visible {
    opacity: 1;
    visibility: visible;
}

.overlay-header {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 30px 50px;
}

.lang-nav .lang-link {
    margin: 0 20px;
    cursor: pointer;
    font-size: 1rem;
    color: #888;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.5);
}

.lang-nav .lang-link:not(.active):hover {
    color: #FF0000;
    transform: scale(1.1);
    text-shadow: 5px 5px 6px rgba(0, 0, 0, 0.5);
}

.lang-nav .active {
    color: #000;
    font-weight: 600;
    pointer-events: none;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.close-btn {
    position: absolute;
    right: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    color: darkred;
    transition: all 0.3s ease;
}

.close-btn:hover {
    color: red;
    transform: scale(1.2);
}

.story-container {
    flex: 1;
    width: 80%;
    max-width: 800px;
    margin: 0 auto 40px auto;
    padding: 40px;
    overflow-y: auto;
    box-sizing: border-box;
    border-radius: 12px;
    opacity: 1;
    transition: opacity 0.5s ease;
    
    line-height: 1.6;
    color: #333;
    font-size: 1.1rem;
}

.story-container.faded {
    opacity: 0;
}

.story-container-ta {
    font-family: 'Arima Madurai', cursive;
    font-weight: 300;
}

.story-container-hi {
    font-family: 'Laila', serif;
    font-weight: 300;
}

.story-container-en {
    font-family: 'Quicksand', sans-serif;
}
