.definition-frame {
    /* ...vorhandene Stile... */
    flex-direction: column;
}
/* Farbiger Rahmen für die Definition von Halluzinationen */
.definition-frame {
    border: 4px solid;
    border-image: linear-gradient(90deg, #f7b42c 0%, #ffd452 40%, #6dd5ed 100%);
    border-image-slice: 1;
    border-radius: 18px;
    background: #fffbe6;
    box-shadow: 0 4px 24px 0 rgba(229,191,121,0.10);
    padding: 24px 28px;
    margin: 18px 0 18px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}
/* Stilvolle Definitionsfolie */
.definition-slide .full-page {
    background: linear-gradient(135deg, #f7f3e9 60%, #e5bf79 100%);
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    border-radius: 18px;
    border: 1.5px solid #e5bf79;
    padding: 32px 28px 24px 28px;
    max-width: 900px;
    margin: 0 auto;
    font-size: 22px;
    color: #2d2d2d;
    position: relative;
}

.definition-slide h3 {
    font-size: 2.2em;
    font-weight: 800;
    color: #b48a2c;
    margin-bottom: 18px;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 8px rgba(229,191,121,0.08);
}

.definition-slide p {
    font-size: 1.15em;
    margin-bottom: 16px;
    line-height: 1.6;
    color: #2d2d2d;
}

.definition-slide .citation {
    background: #f8f3e9;
    border-left: 4px solid #e5bf79;
    padding: 10px 18px;
    font-size: 0.98em;
    color: #7a5c1c;
    margin-bottom: 12px;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 2px 8px rgba(229,191,121,0.07);
}

.definition-slide details {
    background: #fffbe6;
    border: 1px solid #e5bf79;
    border-radius: 8px;
    padding: 10px 18px;
    margin-top: 10px;
    font-size: 0.98em;
    color: #7a5c1c;
    box-shadow: 0 2px 8px rgba(229,191,121,0.07);
}

.definition-slide a {
    color: #b48a2c;
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.2s;
}
.definition-slide a:hover {
    color: #e5bf79;
}

@media (max-width: 768px) {
    .definition-slide .full-page {
        padding: 16px 6px 12px 6px;
        font-size: 1em;
        max-width: 100%;
    }
    .definition-slide h3 {
        font-size: 1.3em;
    }
    .definition-slide p {
        font-size: 1em;
    }
}
/* Allgemeine Stile */
html, body {
    margin: 0;
    padding: 0;
    overflow: hidden; /* Prevent page-level scrolling */
    height: 100vh;
    width: 100vw;
}

body {
    background-color: #e5bf79;
    font-family: 'Fira Sans', serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.fullscreen-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    background-color: rgb(98, 126, 110);
    border: none;
    color: white;
    font-size: 20px;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.fullscreen-btn:hover {
    background-color: rgb(78, 106, 90);
    transform: scale(1.05);
}

.fullscreen-btn:active {
    transform: scale(0.95);
}

/* Buch-Container */
#book-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    width: 100%; /* Ensure the container takes full width */
    position: relative;
    flex: 1;
    min-height: 0;
    overflow-y: auto; /* Allow scrolling within the book container */
    overflow-x: hidden;
}

/* Fullscreen-specific constraints */
body.fullscreen-active #book-container {
    max-height: 100vh;
}

.book {
    width: 90%; /* Adjust to fit screen width */
    max-width: 1200px; /* Maximum width */
    height: 80vh; /* Reduced height to 80% of viewport */
    position: relative;
    display: flex;
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.3);
    background-color: #fdfdfd;
    transform-style: preserve-3d;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0; /* Prevent book from shrinking */
}

/* Fullscreen-specific book sizing */
body.fullscreen-active .book {
    height: 80vh; /* 80% of viewport height in fullscreen */
    max-height: calc(100vh - 140px); /* Subtract progress bar (~50px) + navigation (~60px) + margins (~30px) */
}

.page-pair {
    display: flex;
    width: 100%;
    height: 100%; /* Make sure it takes the full height of the book */
    border-radius: 10px;
    display: none; /* Hide all pairs initially */
}

.page-single {
    display: flex;
    width: 100%;
    height: 100%; /* Full height of the book */
    border-radius: 10px;
    display: none; /* Hide all single pages initially */
    padding-bottom: 40px; /* Default padding */
}

/* Fullscreen-specific page-single constraints */
body.fullscreen-active .page-single {
    padding-bottom: 0; /* Remove padding in fullscreen */
}

.page {
    width: 50%;
    padding: 20px; /* Default padding */
    box-sizing: border-box;
    background-color: #fffefb;
    box-shadow: inset 10px 0 20px rgba(0, 0, 0, 0.1);
    overflow-y: auto; /* Allow scrolling within the page */
    overflow-x: hidden;
    display: flex; /* Use Flexbox for centering */
    flex-direction: column;
    justify-content: center; /* Center content vertically */
    align-items: center; /* Center content horizontally */
    padding-bottom: 40px;
}

/* Fullscreen-specific page constraints */
body.fullscreen-active .page {
    padding: 15px; /* Reduced padding in fullscreen */
    max-height: 100%;
    padding-bottom: 15px;
}

.left-page {
    border-right: 1px solid #ccc;
    color: #000;
    font-family: "Fira Sans";
    font-size: 22px; /* Default font size */
    font-style: normal;
    font-weight: 300;
    line-height: normal;
}

/* Fullscreen-specific font sizing */
body.fullscreen-active .left-page {
    font-size: clamp(16px, 1.8vw, 22px); /* Responsive font size */
    line-height: 1.4; /* Better line height for readability */
}

.right-page {
    padding-left: 20px;
    color: #000;
    font-family: "Fira Sans";
    font-size: 22px; /* Default font size */
    font-style: normal;
    font-weight: 300;
    line-height: normal;
}

/* Fullscreen-specific font sizing */
body.fullscreen-active .right-page {
    font-size: clamp(16px, 1.8vw, 22px); /* Responsive font size */
    line-height: 1.4; /* Better line height for readability */
}

.full-page {
    width: 100%; /* Full width for single pages */
    background-color: #fffefb;
    padding: 20px; /* Default padding */
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Center content vertically */
    align-items: center;
    color: #000;
    font-family: "Fira Sans";
    font-size: 20px; /* Default font size */
    font-style: normal;
    font-weight: 300;
    line-height: normal;
    overflow-y: auto; /* Allow scrolling within the full page */
    overflow-x: hidden;
}

/* Fullscreen-specific full-page constraints */
body.fullscreen-active .full-page {
    padding: 15px; /* Reduced padding in fullscreen */
    font-size: clamp(16px, 1.6vw, 20px); /* Responsive font size */
    line-height: 1.4; /* Better line height for readability */
    max-height: 100%;
}

.citation {
    padding-left: 20px;
    color: #000;
    font-family: "Fira Sans";
    font-size: 14px;
    font-style: normal;
    font-weight: 300;
    line-height: normal;
}

.activity {
    padding-left: 20px;
    color: #000000;
    font-family: "Fira Sans";
    font-size: 22px;
    font-style: normal;
    font-weight: 200;
    line-height: normal;
}

/* Center the chapter-title in the left page */
.chapter-title {
    font-size: 2em; /* Adjust size as needed */
    margin: 0; /* Remove default margin */
    text-align: left; /* Center text alignment */
    color: #000;
    font-family: "Fira Sans";
    font-size: 52px;
    font-style: normal;
    font-weight: 900;
    line-height: normal;
    width: 100%; /* Ensure the title spans the full width */
}

.character-image {
    width: 100%; /* Make image take up full width */
    height: auto; /* Maintain aspect ratio */
    max-width: 100%; /* Ensure the image doesn't overflow */
    margin-bottom: 5px; /* Add a very small margin to ensure it's close but not touching the bottom */
    padding: 0; /* Remove any padding */
    object-fit: contain; /* Ensure the image fits well within its container */
}

/* Fullscreen-specific character image constraints */
body.fullscreen-active .character-image {
    max-height: 100%; /* Ensure image fits within page */
}

.corner-image {
    bottom: 0; /* Position at the bottom */
    left: 0; /* Position at the left */
    max-width: 100%;
    width: 200px;
    height: 200px;
    object-fit: contain; 
  }

/* Responsive Bilder */
.image {
    width: 90%; /* Make image take up full width */
    height: auto; /* Maintain aspect ratio */
    max-width: 100%; /* Ensure the image doesn't overflow */
    padding: 5px;
    border-radius: 20px;
    object-fit: contain; /* Ensure image fits without distortion */
}

/* Fullscreen-specific image constraints */
body.fullscreen-active .image {
    height: auto !important; /* Override inline styles */
    max-height: 40vh !important; /* Limit image height to fit viewport, override inline */
}

/* Fullscreen-specific paragraph and heading constraints */
body.fullscreen-active .full-page p,
body.fullscreen-active .page p {
    max-width: 100% !important;
    font-size: clamp(14px, 1.5vw, 20px) !important; /* Responsive font size */
    line-height: 1.4 !important;
    margin: 0.5em 0 !important;
}

body.fullscreen-active .full-page h1,
body.fullscreen-active .full-page h2,
body.fullscreen-active .full-page h3 {
    font-size: clamp(18px, 2vw, 28px) !important;
    margin: 0.5em 0 !important;
    line-height: 1.3 !important;
}

/* Responsives Iframe */
iframe {
    width: 100%; /* Make iframe take up full width */
    height: auto;
    aspect-ratio: 16/9; /* Maintain a 16:9 aspect ratio */
    border: none;
}

/* Fullscreen-specific iframe constraints */
body.fullscreen-active iframe {
    max-height: 50vh; /* Limit iframe height to fit viewport */
}

/* Navigations-Buttons */
.navigation {
    margin-top: 10px;
    margin-bottom: 10px;
    flex-shrink: 0; /* Prevent shrinking */
}

.navigation button {
    padding: 10px 20px;
    font-size: 16px;
    margin: 0 10px;
    background-color: #333;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.navigation button:hover {
    background-color: #555;
}

/* Stil für die Seitenzahlen */
.page-number {
    position: absolute;
    bottom: 10px;
    font-size: 14px;
    color: #666;
    font-family: 'Fira Sans', serif;
}

.page-number.left {
    left: 20px; /* Bottom left for left pages */
}

.page-number.right {
    right: 20px; /* Bottom right for right pages */
}

.page-number.hide {
    display: none;
}

/* Fortschrittsleisten-Container */
#progress-bar-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90%; /* Match the width of the book */
    max-width: 1200px; /* Match the book's max width */
    margin: 10px 0 5px 0; /* Reduced margins */
    position: relative;
    z-index: 10;
    flex-shrink: 0; /* Prevent shrinking */
}

#progress-bar {
    width: 100%; /* Make progress bar take full width of the container */
    height: 30px; /* Increased height of the progress bar */
    background-color: #ddd; /* Background color of the progress bar */
    border-radius: 15px; /* Adjusted rounded edges */
    overflow: hidden; /* Ensure the fill does not overflow */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Add a slight shadow for depth */
    position: relative; /* Enable absolute positioning for the lamp */
}

#progress-fill {
    width: 0%; /* Start at 0% */
    height: 100%; /* Fill the entire height */
    background: linear-gradient(90deg, #4CAF50, #e9ff1e); /* Gradient color */
    transition: width 0.4s ease; /* Smooth transition for the progress */
    border-radius: 15px; /* Adjusted rounded edges */
    position: relative;
}

#lamp-icon {
    position: absolute;
    top: 0px; /* Adjust the position to ensure the lamp icon is fully visible */
    left: 0; /* Start position of the lamp */
    width: 30px; /* Adjust the size of the lamp icon */
    height: 30px; /* Ensure it's proportionate */
    transition: left 0.4s ease; /* Move smoothly with the progress */
    pointer-events: none; /* Ensure the icon does not interfere with clicking */
    z-index: 5; /* Ensure the lamp is above the progress bar */
}

/* Responsives Design - Mobil */
@media (max-width: 768px) {
    .book {
        width: 100%; /* Make book take full width on smaller screens */
        max-width: 100%; /* No max width limit */
        height: auto; /* Allow flexible height */
    }
    
    /* Fullscreen-specific mobile constraints */
    body.fullscreen-active .book {
        max-height: calc(100vh - 120px); /* Adjust for mobile */
    }

    .page-pair {
        flex-direction: column; /* Stack pages vertically */
        height: auto; /* Allow flexible height */
    }

    .page {
        width: 100%; /* Make pages full width */
        padding: 10px; /* Adjust padding */
        box-shadow: none; /* Remove shadows */
        justify-content: flex-start; /* Align content at the top for mobile */
    }

    .left-page {
        border-right: none; /* Remove border on smaller screens */
        border-bottom: 1px solid #ccc; /* Add a bottom border */
    }

    .right-page {
        padding-left: 10px;
    }

    /* Adjust heading and paragraph sizes for mobile */
    h1, h2 {
        font-size: 1.5em; /* Reduced size */
    }

    .chapter-title {
        font-size: 1.8em; /* Adjust chapter title size for mobile */
        text-align: left; /* Align title to the left for readability */
    }

    p {
        font-size: 0.9em; /* Reduced paragraph size */
    }

    /* Adjust embedded content for smaller screens */
    /* Fullscreen-specific mobile constraints */
    body.fullscreen-active iframe {
        max-height: 40vh !important; /* Limit iframe height on mobile */
    }
    
    body.fullscreen-active .image {
        max-height: 30vh !important; /* Smaller images on mobile */
    }

    .character-image {
        width: 100%;
        max-width: 100%; /* Ensure image fits within container */
    }

    .corner-image{
        width: 100%;
        max-width: 100%; /* Ensure image fits within container */
    }

    .navigation button {
        padding: 8px 12px; /* Adjust button size */
        font-size: 14px; /* Adjust font size */
        margin: 5px; /* Adjust spacing */
    }

    .page-number {
        display: none;
    }

}

/* Responsives Design - Tablets */
@media (min-width: 769px) and (max-width: 1024px) {
    .book {
        width: 95%; /* Use most of the screen */
        max-width: 1000px; /* Maximum width */
        height: 700px; /* Default height */
    }
    
    /* Fullscreen-specific tablet constraints */
    body.fullscreen-active .book {
        max-height: calc(100vh - 130px); /* Adjusted height for tablets */
    }

    .page-pair {
        height: 100%; /* Make sure it takes the full height of the book */
    }

    .page {
        padding: 20px;
        justify-content: center; /* Center content vertically */
    }

    .navigation button {
        padding: 10px 20px;
        font-size: 16px;
    }

    /* Fullscreen-specific tablet constraints */
    body.fullscreen-active iframe {
        max-height: 45vh !important; /* Limit iframe height on tablets */
    }
}
