/* ============================================================
   video-detail.css — 影片內頁專屬樣式（個人創作者風格）
   ------------------------------------------------------------
   命名規則：BEM（block__element--modifier）
   ============================================================ */

/* ===== 主容器（兩欄） ===== */
.detail {
    max-width: 1360px;
    margin: 30px auto 40px;
    padding: 0 24px;
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}
.detail__main {
    flex: 2;
    min-width: 0;
}

/* ===== 影片播放器（YouTube 崁入） ===== */
.detail__player {
    background: var(--color-dark);
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    position: relative;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
}
.detail__player iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ===== 影片資訊 ===== */
.detail__info {
    margin-top: 20px;
}
.detail__title {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-text);
}
.detail__channel-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-border);
}
.detail__channel {
    display: flex;
    align-items: center;
    gap: 14px;
}
.detail__channel-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-accent), var(--color-primary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    flex-shrink: 0;
    border: 2px solid #ff0033;
}
.detail__channel-name {
    font-weight: 600;
    font-size: 16px;
}
.detail__channel-name small {
    font-weight: 400;
    color: var(--color-gray);
    font-size: 13px;
    margin-left: 6px;
}
.detail__subscribe-btn {
    background: #ff0033;
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: bold;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
}
.detail__subscribe-btn:hover {
    background: #cc0022;
    transform: scale(1.02);
}

/* ===== 互動列 ===== */
.detail__action-bar {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    margin-top: 10px;
}
.detail__stat {
    font-size: 14px;
    color: var(--color-gray);
}
.detail__stat strong {
    color: var(--color-text);
}
.detail__action-group {
    display: flex;
    gap: 6px;
    margin-left: auto;
    flex-wrap: wrap;
}
.detail__action-btn {
    background: #f1f5f9;
    border: none;
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
    cursor: pointer;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
}
.detail__action-btn:hover {
    background: #e2e8f0;
}
.detail__action-btn--liked {
    background: var(--color-bg-light);
    color: var(--color-primary);
}
.detail__action-btn i {
    font-size: 16px;
}

/* ===== 影片說明 ===== */
.detail__desc {
    background: #f8fafc;
    border-radius: 12px;
    padding: 16px 20px;
    margin-top: 16px;
    border: 1px solid var(--color-border);
    font-size: 14px;
    line-height: 1.7;
    color: #334155;
}
.detail__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}
.detail__tags span {
    background: #e2e8f0;
    padding: 2px 12px;
    border-radius: 20px;
    font-size: 12px;
    color: var(--color-gray);
}

/* ===== 留言區 ===== */
.comment__section {
    margin-top: 30px;
}
.comment__header h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.comment__header h3 span {
    font-size: 14px;
    font-weight: 400;
    color: var(--color-gray);
}
.comment__item {
    display: flex;
    gap: 14px;
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid #f1f5f9;
}
.comment__item:last-child {
    border-bottom: none;
}
.comment__avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #cbd5e1;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #475569;
    font-size: 14px;
}
.comment__body {
    flex: 1;
}
.comment__body .comment__name {
    font-weight: 600;
    font-size: 13px;
}
.comment__name small {
    font-weight: 400;
    color: var(--color-gray);
    font-size: 11px;
    margin-left: 10px;
}
.comment__body p {
    font-size: 14px;
    line-height: 1.5;
    margin: 4px 0 6px;
}
.comment__actions {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--color-gray);
}
.comment__actions i {
    margin-right: 4px;
}
.comment__more {
    margin-top: 12px;
}
.comment__more button {
    background: transparent;
    border: 1px solid var(--color-border);
    padding: 10px 24px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    color: var(--color-text);
    font-family: inherit;
}
.comment__more button:hover {
    border-color: var(--color-btn);
    color: var(--color-primary);
}

/* ===== 右欄：推薦影片 ===== */
.detail__side {
    flex: 1;
    min-width: 280px;
    max-width: 400px;
}
.detail__side-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.detail__side-title i {
    color: #ff0033;
}
.detail__rec {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    padding: 8px;
    border-radius: 10px;
    transition: 0.2s;
    cursor: pointer;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    text-decoration: none;
    color: inherit;
}
.detail__rec:hover {
    background: #f8fafc;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
.detail__rec-thumb {
    width: 160px;
    min-width: 160px;
    height: 90px;
    border-radius: 10px;
    background: var(--color-dark);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
    position: relative;
    overflow: hidden;
}
.detail__rec-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.detail__rec-dur {
    position: absolute;
    bottom: 4px;
    right: 6px;
    background: rgba(0, 0, 0, 0.7);
    font-size: 10px;
    padding: 1px 8px;
    border-radius: 4px;
}
.detail__rec-info h4 {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.detail__rec-channel {
    font-size: 12px;
    color: var(--color-gray);
}
.detail__rec-views {
    font-size: 11px;
    color: var(--color-gray);
}
.detail__side-more {
    text-align: center;
    margin-top: 12px;
}
.detail__side-more a {
    color: var(--color-btn);
    font-weight: 600;
    text-decoration: none;
    font-size: 14px;
}
.detail__side-more a:hover {
    text-decoration: underline;
}

/* ===== 響應式 ===== */
@media (max-width: 992px) {
    .detail {
        flex-direction: column;
        padding: 0 16px;
    }
    .detail__side {
        max-width: 100%;
        min-width: 0;
    }
    .detail__rec-thumb {
        width: 130px;
        min-width: 130px;
        height: 74px;
    }
    .detail__title {
        font-size: 20px;
    }
    .detail__action-group {
        margin-left: 0;
        margin-top: 8px;
    }
}
@media (max-width: 600px) {
    .detail__player-play i {
        font-size: 48px;
    }
    .detail__rec-thumb {
        width: 100px;
        min-width: 100px;
        height: 56px;
    }
    .detail__channel-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .detail__action-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    .detail__action-group {
        width: 100%;
        justify-content: flex-start;
    }
}
