/*--------------------------------------------------------------
# Poster Generation Styles
--------------------------------------------------------------*/
#poster-container {
    /* This container is positioned off-screen for html2canvas to render it. */
    /* The 'display: none' rule was removed to make it renderable. */
    position: absolute;
    left: -9999px;
    top: 0;
    width: 900px;
    height: 350px;
    background: #fff;
    border: 1px solid #ccc;
    overflow: hidden;
}

.poster-content {
    width: 100%;
    height: 100%;
    font-family: sans-serif;
    box-sizing: border-box;
    padding: 0;
}

.poster-layout {
    display: flex;
    align-items: stretch;
    height: 100%;
}

.poster-image-container {
    flex: 0 0 250px;
}

.poster-middle-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 5px 25px; /* Adjusted padding */
    box-sizing: border-box;
    overflow: hidden; /* Prevent content from overflowing */
}

.poster-middle-container .poster-movie-info-list p {
    margin: 4px 0;
    font-size: 0.9rem;
}

.poster-middle-container .poster-movie-info-list strong {
    color: var(--primary-color);
    margin-right: 8px;
}

.poster-cast-line {
    display: table;
    width: 100%;
    table-layout: fixed;
}

.poster-cast-line > * {
    display: table-cell;
    vertical-align: baseline;
}

.poster-cast-line strong {
    width: 60px; /* Adjust width as needed */
}

.poster-cast-line .cast-text-wrapper {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.poster-right-container {
    flex: 0 0 120px; /* Fixed width for the right column */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between; /* Pushes rating to top, QR to bottom */
    padding: 25px 15px;
    box-sizing: border-box;
    border-left: 1px solid #eee;
}

.poster-image-container img {
    width: 250px;
    height: 350px;
    object-fit: cover;
    display: block;
}

.poster-middle-container .entry-title {
    font-size: 28px;
    font-weight: bold;
    margin: 0 0 15px;
    color: #000;
}

.poster-middle-container .entry-subtitle {
    font-size: 20px;
    margin: 0 0 20px;
    color: #555;
}

.poster-middle-container .entry-content {
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    overflow-y: auto; /* Add scroll for long content */
}

.poster-right-container .douban-rating {
    margin-bottom: 0;
}

.poster-right-container .poster-qr-code {
    margin-top: 0;
    border-top: none;
    padding-top: 0;
}

.poster-qr-code p {
    font-size: 12px;
    color: #333;
    margin: 0 0 5px 0;
}

.poster-qr-code img {
    width: 100px;
    height: 100px;
    margin: 0 auto;
    display: block;
}

#poster-preview {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

#poster-preview img {
    max-width: 80%;
    max-height: 80%;
    border: 3px solid white;
}

#poster-preview h2 {
    color: white;
    margin-bottom: 20px;
}

#poster-preview button {
    margin-top: 20px;
    padding: 10px 20px;
    cursor: pointer;
}