/* ending-ui.css */
@import url("fonts.css");

#teaser-page {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: black;
    z-index: 1;
    visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

#teaser-content {
    position: relative;
    width: 90%;
    max-width: 600px;
    text-align: center;
    z-index: 2;
}

#teaser-text {
    color: white;
    font-family: AvenirLTStd-Roman;
    font-size: clamp(16px, 4.5vw, 24px);
    line-height: 1.4;
    margin-bottom: 30px;
    text-align: center;
}

#teaser-book-title {
    font-style: italic;
    font-family: AveriaSerifLibre-Italic;
}

#teaser-book-cover {
    width: clamp(200px, 50vw, 300px);
    height: auto;
    aspect-ratio: 2/3;
    margin: 30px auto;
    background-image: url('../images/book-1-cover.webp');
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
}

#teaser-continue-button {
    position: relative;
    width: clamp(250px, 60vw, 400px);
    height: auto;
    aspect-ratio: 1084/225;
    margin: 30px auto 0;
    background-image: url('../images/TableOfContents_Option.webp');
    background-repeat: no-repeat;
    background-size: 100%;
    background-position: center;
    cursor: pointer;
    transition: transform 0.2s ease;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

#teaser-continue-button:hover {
    transform: scale(1.05);
}

#teaser-continue-button:active {
    transform: scale(0.98);
}

#teaser-continue-button-text {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 90%;
    height: auto;
    -webkit-transform: translate(-50%, -50%);
    -ms-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    font-family: Iowan;
    font-size: clamp(14px, 5vw, 20px);
    color: white;
    text-align: center;
    pointer-events: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Video Play Overlay */
#video-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 301;
    /* Higher than video's 300 */
    visibility: hidden;
    pointer-events: none;
    /* Let clicks pass through to the document */
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

#video-play-button {
    width: 80px;
    height: 80px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease;
}

#video-play-button:hover {
    transform: scale(1.1);
}

/* CSS Triangle Play Icon - No external files needed! */
#video-play-icon {
    width: 0;
    height: 0;
    border-left: 25px solid #333;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    margin-left: 5px;
    /* Slight offset to center the triangle visually */
}

/* Alternative: If you prefer to use a background image instead */
.video-play-icon-image {
    width: 40px;
    height: 40px;
    background-image: url('../images/your-play-icon.webp');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Responsive adjustments */
@media screen and (max-height: 600px) {
    #ending-content {
        transform: scale(0.9);
    }

    #ending-book-cover {
        margin: 20px auto;
    }

    #ending-restart-button {
        margin: 20px auto 0;
    }
}