* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", sans-serif;
    background: linear-gradient(135deg, #f4a582 0%, #d4896f 50%, #a8846f 100%);
    min-height: 100vh;
    padding: 20px 10px;
    line-height: 1.6;
}

.container {
    max-width: 100%;
    margin: 0 auto;
}

/* Section Titles */
.section-title {
    font-size: 24px;
    color: #d4896f;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #d4896f;
}

/* Program Items */
.program-item {
    margin-bottom: 30px;
}

.program-item h4 {
    font-size: 18px;
    color: #333;
    margin-bottom: 12px;
    font-weight: 600;
}

.bio {
    font-size: 14px;
    color: #555;
    line-height: 1.8;
    text-align: justify;
}

.performance-detail {
    font-size: 14px;
    color: #666;
    margin: 5px 0;
}

.piece {
    font-size: 15px;
    color: #c67b5c;
    margin: 8px 0;
    font-weight: 500;
}

.composer {
    font-size: 13px;
    color: #888;
    margin-bottom: 8px;
    font-style: italic;
}

/* Video Embed */
.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    margin: 15px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Download Link */
.download-link {
    margin: 12px 0;
    padding: 10px 15px;
    background: #f0f0f0;
    border-radius: 8px;
    text-align: center;
}

.download-link a {
    color: #c67b5c;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    display: inline-block;
}

.download-link a:hover {
    color: #d4896f;
    text-decoration: underline;
}

/* Cast */
.cast h5 {
    font-size: 16px;
    color: #d4896f;
    margin: 15px 0 10px 0;
}

.cast-member {
    font-size: 14px;
    color: #555;
    margin: 5px 0;
    padding-left: 10px;
}

/* Musical Acts */
.musical-act {
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f8f8;
    border-radius: 10px;
    border-left: 4px solid #c67b5c;
}

.musical-act h5 {
    font-size: 16px;
    color: #c67b5c;
    margin-bottom: 12px;
    font-weight: 600;
}

.song {
    font-size: 14px;
    color: #d4896f;
    margin: 8px 0;
    font-weight: 500;
}

.performer {
    font-size: 13px;
    color: #666;
    margin: 4px 0;
    padding-left: 15px;
}

/* Thanks & End */
.thanks {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #ddd;
}

.thanks h4 {
    font-size: 18px;
    color: #d4896f;
    margin-bottom: 15px;
}

.sponsor {
    font-size: 14px;
    color: #666;
}

.end {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
    font-size: 18px;
    color: #c67b5c;
    font-weight: 600;
}

/* Flip Mode */
.flip-mode {
    display: block;
    text-align: center;
    position: relative;
}

#flipbook {
    width: 90%;
    /* max-width: 480px; */
    height: 600px;
    margin: 0 auto 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    left: 0 !important;
    top: 0 !important;
    transform: none !important;
}

.page-flip {
    background: #fff;
    overflow-y: auto;
    font-size: 13px;
    width: 100%;
    height: 100%;
}

/* Content wrapper for padding */
.page-flip .content {
    padding: 30px 20px;
    height: 100%;
    overflow-y: auto;
}

/* Cover page in flip mode */
.page-flip.cover-page {
    background: #000;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0;
}

.page-flip.cover-page .content {
    width: 100%;
    height: 100%;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-flip.cover-page img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

/* Sponsor pages */
.page-flip.sponsor-page {
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0;
}

.page-flip.sponsor-page .content {
    width: 100%;
    height: 100%;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-flip.sponsor-page img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.page-flip .section-title {
    font-size: 20px;
}

.page-flip .program-item h4 {
    font-size: 16px;
}

.page-flip .bio,
.page-flip .performance-detail,
.page-flip .piece,
.page-flip .composer {
    font-size: 12px;
}

/* Video in flip mode - make it smaller to fit better */
.page-flip .video-container {
    margin: 10px 0;
}

/* Turn.js wrapper fixes */
.flip-mode .turn-page {
    background: #fff;
}

/* Prevent layout shift during page flip */
.flip-mode {
    min-height: 700px;
}

/* Ensure flipbook stays in place */
#flipbook * {
    box-sizing: border-box;
}

/* Flip Controls */
.flip-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
    position: relative;
    z-index: 10;
}

.flip-controls button {
    background: #fff;
    color: #c67b5c;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.flip-controls button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.flip-controls button:active {
    transform: translateY(0);
}

.flip-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#pageNumber {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    min-width: 60px;
}

/* Responsive Design */
@media (min-width: 768px) {
    body {
        padding: 30px 20px;
    }

    .container {
        max-width: 800px;
    }

    #flipbook {
        width: 640px;
        height: 800px;
    }

    .page-flip {
        font-size: 14px;
    }

    .page-flip .content {
        padding: 40px 30px;
    }

    .page-flip .section-title {
        font-size: 24px;
    }

    .page-flip .program-item h4 {
        font-size: 18px;
    }

    .page-flip .bio,
    .page-flip .performance-detail,
    .page-flip .piece,
    .page-flip .composer {
        font-size: 13px;
    }
}

/* Print Styles */
@media print {
    body {
        background: #fff;
        padding: 0;
    }

    .flip-controls {
        display: none;
    }

    .page-flip {
        page-break-after: always;
        box-shadow: none;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Touch-friendly */
button, a {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
}
