/* ========================================================
   作品集主排版
   ======================================================== */
.showreel-container {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 40px;
    color: #2b2b2b;
}

.showcase-section {
    background: #ffffff;
    border-radius: 24px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    border-bottom: 1px solid #eeeeee;
    padding-bottom: 20px;
}

.member-info h2 {
    font-size: 24px;
    color: #2b2b2b;
    letter-spacing: 1px;
}

.filter-btn-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    background: #f5f5f5;
    border: 1px solid transparent;
    color: #777777;
    padding: 8px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-btn:hover {
    background: #eeeeee;
    color: #2b2b2b;
}

.filter-btn.active {
    background: #a29bfe;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(162, 155, 254, 0.3);
}

/* 行動端重整友善提示列 */
.mobile-refresh-tip {
    display: none;
    width: 100%;
    text-align: center;
    background: #fdfdfd;
    color: #888;
    padding: 10px;
    font-size: 12px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px dashed #ddd;
}

@media (max-width: 767px) {
    .mobile-refresh-tip {
        display: block;
    }
}

/* ========================================================
   黑膠捲輪轉舞台 (Horizontal Scroll Reel)
   ======================================================== */
.reel-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.film-reel {
    display: block;
    padding: 10px 5px 25px 5px;
    cursor: grab;
    touch-action: pan-y;
}

.film-reel:active {
    cursor: grabbing;
}

.film-reel-stage {
    display: flex;
    gap: 24px;
    width: max-content;
    will-change: transform;
    transform: translate3d(0px, 0px, 0px);
}

.work-item {
    flex: 0 0 320px;
    background: #000000;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 16 / 9;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    -webkit-user-drag: none;
    user-select: none;

    /* 🚀 核心升級：融入 Transition 屬性，提供頂級柔和的 opacity 與縮放轉場曲線 */
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1),
                box-shadow 0.4s cubic-bezier(0.25, 1, 0.5, 1),
                opacity 0.35s cubic-bezier(0.25, 1, 0.5, 1);
    opacity: 1;
}

/* 🚀 分類切換時的優雅微縮與淡出動態樣式 */
.work-item.anim-out {
    opacity: 0;
    transform: scale(0.9) translateY(10px) !important;
    pointer-events: none;
}

.work-item.hide {
    display: none !important;
}

.work-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 28px rgba(162, 155, 254, 0.4);
}

.work-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    pointer-events: none;
}

.work-item:hover .work-thumb {
    transform: scale(1.08);
}

/* 遮罩文字排版 */
.work-overlay {
    position: absolute;
    bottom: 0; left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    color: #ffffff;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    pointer-events: none;
    gap: 4px;
}

.work-item:hover .work-overlay {
    opacity: 1;
}

.work-title {
    font-size: 15px;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0,0,0,0.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.work-author {
    font-size: 11px;
    color: #ff7675;
    font-weight: bold;
}

.work-tag {
    font-size: 11px;
    color: #a29bfe;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ========================================================
   YouTube 燈箱播放器 (Modal) 外觀
   ======================================================== */
.yt-modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.yt-modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.yt-modal-container {
    position: relative;
    width: 90%;
    max-width: 960px;
    aspect-ratio: 16 / 9;
    background: #000000;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.yt-modal-overlay.open .yt-modal-container {
    transform: scale(1);
}

.yt-modal-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.yt-modal-close {
    position: absolute;
    top: -45px; right: 0;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 32px;
    cursor: pointer;
    transition: transform 0.2s;
}
.yt-modal-close:hover { transform: scale(1.1); }

/* ========================================================
   區塊分隔線與響應式
   ======================================================== */
.section-divider {
    display: flex; align-items: center; justify-content: center; gap: 15px; margin: 50px auto; max-width: 80%; color: #e0e0e0;
}
.section-divider::before, .section-divider::after {
    content: ''; flex: 1; height: 1px; background: linear-gradient(to var(--direction, right), rgba(162, 155, 254, 0.4), rgba(224, 224, 224, 0.1));
}
.section-divider::before { --direction: left; }
.section-divider::after { --direction: right; }
.divider-dot { width: 6px; height: 6px; background-color: #a29bfe; border-radius: 50%; opacity: 0.6; box-shadow: 0 0 8px rgba(162, 155, 254, 0.8); }
.divider-dot.side { width: 4px; height: 4px; background-color: #2b2b2b; opacity: 0.3; box-shadow: none; }

@media (max-width: 767px) {
    .showreel-container { padding: 0 15px; margin: 20px auto; }
    .showcase-section { padding: 20px 15px; border-radius: 16px; }
    .section-header { flex-direction: column; align-items: flex-start; gap: 15px; margin-bottom: 20px; padding-bottom: 15px; }
    .member-info h2 { font-size: 20px; }
    .filter-btn-group { width: 100%; justify-content: flex-start; gap: 8px; }
    .filter-btn { padding: 6px 16px; font-size: 13px; }
    .work-item { flex: 0 0 260px; }
    .work-overlay { opacity: 1; background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 70%, transparent 100%); padding: 12px; }
    .work-title { font-size: 13px; }
    .section-divider { margin: 30px auto; }
    .yt-modal-close { top: 10px; right: 10px; background: rgba(0,0,0,0.5); width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 24px; z-index: 10; }
}
