body {
    background-image: url('images/background2.webp'); 
    background-size: cover;         
    background-position: center;  
    background-repeat: no-repeat;    
    background-attachment: fixed;   
    min-height: 100vh;          
}
@media (max-width: 800px) {
    body{
            background-image: url('images/background2_mobile.webp'); 
    }
}



#htmlBook, #canvasBook { 
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow: visible !important; 

    border: 2px solid red;
}
#htmlBook {
    display: flex;
    justify-content: center;
    align-items: center;
}
#htmlBookExample {
    transition: transform 0.6s ease-in-out; 
}
.stf__wrapper {
    margin: 0 auto !important;
    
}
.block {
    width: 100%;
    min-height: calc(100vh - 70px); /* subtract header height */
    height: auto;
}

.flip-book { 
    margin: auto; 
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1); /* Smooth sliding effect */
}

.page { 
    padding: 2rem;
    background-color: #fdfaf7; 
    color: #785e3a; 
    border: solid 1px #c2b5a3; 
    overflow: visible !important; 

    border: 2px solid green;
}

.page .page-footer { height: 30px; border-top: solid 1px #f4e8d7; font-size: 80%; color: #998466; }
.flag-icon {
    width: 20px;
    height: 14px;
}
.page.--left { border-right: 0; box-shadow: inset -7px 0 30px -7px rgba(0, 0, 0, 0.25); }
.page.--right { border-left: 0; box-shadow: inset 7px 0 30px -7px rgba(0, 0, 0, 0.25); }
.page.--right .page-footer { text-align: right; }
.glass-btn {
    /* Base Glass Look */
    background-color: rgba(255, 255, 255, 0.1); /* 10% White */
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    
    /* Text & Border */
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3); /* Subtle white border */
    
    /* Smooth Animation */
    transition: all 0.3s ease;
}

.glass-btn:hover {
    background-color: rgba(255, 255, 255, 0.25); /* 25% White (Brighter) */
    border-color: rgba(255, 255, 255, 0.6);      /* Brighter border */
    transform: translateY(-2px);                 /* Float up slightly */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);   /* deeper shadow */
    color: white;                                /* Keep text white */
}

.glass-btn:active {
    transform: translateY(0);
    background-color: rgba(255, 255, 255, 0.15);
}

/* The Page Counter (Static Glass Box) */
.glass-box {
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.sticky-header {
    position: sticky; 
    position: -webkit-sticky; 
    top: 0;
    z-index: 1000;
    
    background: transparent;
    backdrop-filter: blur(2px);          
    -webkit-backdrop-filter: blur(2px);   
    
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.8rem 0;
    width: 100%;
}

.lang-container {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 0 auto;
    background-color: transparent;
    
}

.lang-btn {
    position: relative; 
    display: flex;
    align-items: center;
    background: #ffffff; 
    border: 3px solid transparent;
    border-radius: 30px; 
    
    padding: 8px 16px 10px 16px; 
    
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #444;      
    transition: all 0.2s ease-in-out;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.lang-btn.active-lang {
    border: 3px solid #3b82f6;
    color: #3b82f6;        
    background: #f0f7ff;  
}

.lang-btn.active-lang::after {
    content: '';
    position: absolute;
    bottom: 4px; /* Position from the bottom edge */
    left: 50%;
    transform: translateX(-50%); /* Centers the dot perfectly */
    
    width: 5px;
    height: 5px;
    background-color: #3b82f6; /* Bright Blue Dot */
    border-radius: 50%;        /* Makes it a circle */
    box-shadow: 0 0 6px rgba(59, 130, 246, 0.6); /* Adds a "glow" */
    
    /* Pop-in animation */
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Animation definition */
@keyframes popIn {
    0% { transform: translateX(-50%) scale(0); }
    100% { transform: translateX(-50%) scale(1); }
}

/* Hover effects remain the same */
.lang-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    /* 1. Wrap if needed, but keep them centered */
    .lang-container {
        flex-wrap: wrap; 
        gap: 8px;
        padding: 0 5px;
    }

    /* 2. subtle size increase (User-Friendly, not Giant) */
    .lang-btn {
        /* No flex-grow: This stops them from stretching to fill the whole screen width */
        flex-grow: 0; 
        
        /* Font: Just 1px larger than desktop (15px) */
        font-size: 15px !important; 
        
        /* Padding: Enough for a thumb, but not a block */
        padding: 10px 10px !important; 
    }

    /* 3. Flags: Just slightly larger */
    .flag-icon {
        width: 22px !important;
        height: 16px !important;
    }
}

