body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: black;
    color: white;
    font-family: Arial, sans-serif;
}

#viewerContainer {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

canvas {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.4s ease-in-out;
}

#loadingIndicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    background-color: rgba(184, 184, 184, 0.7);
    padding: 20px 40px;
    border-radius: 10px;
}

#loadingIndicator::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid white;
    border-top: 3px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#navigationControls {
    position: absolute;
    bottom: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    z-index: 1000;
    transition: left 0.3s ease-in-out;
}

.navButton {
    background-color: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px 10px 6px 10px;
    margin-right: 5px;
    border-radius: 5px;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    height: 33px;
}

.navButton:hover {
    background-color: rgba(16, 16, 16, 0.5);
}

.navButton svg {
    width: 16px;
    height: 16px;
    padding-top: 1px;
}

#slideInfo {
    font-size: 16px;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 8.2px 10px 6.4px 10px;
    border-radius: 5px;
    transition: opacity 0.3s ease-in-out;
}

.hidden {
    opacity: 0;
    pointer-events: none;
}

#avatarIframe {
    position: absolute;
    border: none;
    transition: opacity 0s ease-in-out;
    opacity: 0;
    pointer-events: none;
}

#avatarIframe.visible {
    opacity: 1;
    pointer-events: auto;
}

#avatarIframe.bottom-right {
    width: 20% !important;
    height: 24% !important;
    right: 20px !important;
    bottom: 20px !important;
    top: auto !important;
    left: auto !important;
    min-height: 215px;
}

.email-form-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.email-form {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    color: #10181f;
}

.email-form h2 {
    margin-bottom: 1rem;
}

.email-form input {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.email-form button {
    background-color: #00b7af;
    color: #ebebeb;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
}

.email-form button:hover {
    background-color: #039b93;
}

#avatarVideo {
    position: absolute;
    border-radius: 9%;
    object-fit: cover;
    display: none;
}

#avatarVideo.visible {
    display: block;
}

.slide-switcher {
    position: absolute;
    top: 0;
    left: -230px;
    width: 230px;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    transition: left 0.3s ease-in-out;
    z-index: 1001;
    overflow-y: auto;
    padding: 20px 20px 20px 5px;
    box-sizing: border-box;
}

.slide-switcher.open {
    left: 0;
}

.slide-switcher h2 {
    margin-top: 0;
    color: white;
}

#thumbnailContainer {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.thumbnail-item {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 10px 193px 10px 5px;
    border-radius: 5px;
    transition: background-color 0.2s ease-in-out;
    margin-left: 5px;
}

.thumbnail-item .page-number {
    min-width: 1px;
    text-align: right;
    margin-right: 15px;
    font-size: 14px;
    margin-left: -5px;
    padding-left: 5px;
}

.thumbnail-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.thumbnail-item img {
    width: 160px;
    height: 90px;
    object-fit: cover;
    margin-left: 10px;
}

.thumbnail-item span {
    color: white;
}