/* Trang chi tiết phim — tông #171d21 navbar, #e2d703 accent */

.movie-page {
    padding: 24px 30px 48px;
    min-height: 60vh;
    background: linear-gradient(180deg, #0b0f14 0%, #171d21 35%, #171d21 100%);
    color: #f1f5f9;
}

.movie-title-main {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #fff;
    letter-spacing: -0.02em;
}

/* VIDEO */
.video-section {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto 1.5rem;
    aspect-ratio: 16 / 9;
    max-height: 56vh;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(226, 215, 3, 0.15);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

    .video-section iframe {
        width: 100%;
        height: 100%;
        border: 0;
    }

/* HEADER */
.movie-header {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 1.25rem;
    align-items: start;
    max-width: 1100px;
    margin: 0 auto 1.5rem;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.poster img {
    width: 100%;
    border-radius: 10px;
    display: block;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.info h2 {
    font-size: 1.35rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.info-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    background: #e2d703;
    color: #171d21;
}

.badge-outline {
    background: transparent;
    color: #e2d703;
    border: 1px solid rgba(226, 215, 3, 0.5);
}

.info-content {
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.65;
}

/* RATING */
.rating-box {
    grid-column: 1 / -1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    text-align: left;
    padding: 0.75rem;
    background: rgba(12, 22, 35, 0.92);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.rating-summary-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0;
    min-width: 0;
}

.rating-circle-score {
    width: 56px;
    height: 56px;
    border-radius: 999px;
    border: 3px solid #84cc16;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #e5e7eb;
    font-size: 20px;
    font-weight: 700;
}

.rating-summary-main {
    min-width: 0;
}

.rating-summary-stars {
    color: #facc15;
    font-size: 18px;
    letter-spacing: 1px;
    line-height: 1;
}

.rating-summary-text {
    margin: 2px 0 0;
    color: #e5e7eb;
    font-size: 14px;
    font-weight: 600;
}

.score {
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

.score-max {
    font-size: 1rem;
    font-weight: 600;
    color: #94a3b8;
    margin-left: 2px;
}

.score-muted {
    color: #64748b;
}

.rating-count {
    margin: 0.35rem 0 0;
    font-size: 12px;
    color: #94a3b8;
}

.rating-form {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    text-align: left;
    min-width: 280px;
    max-width: 320px;
}

.rating-form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 0.5rem;
}

.rating-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.rating-star-line {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    background: rgba(37, 99, 235, 0.18);
    border: 1px solid rgba(96, 165, 250, 0.45);
    border-radius: 6px;
    padding: 6px 8px;
    margin-bottom: 0.6rem;
}

.rating-star-btn {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #e2e8f0;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s ease, transform 0.15s ease;
}

.rating-star-btn:hover {
    color: #fde047;
    transform: translateY(-1px);
}

.rating-star-btn.active {
    color: #facc15;
}

.rating-select {
    flex: 1;
    min-width: 5rem;
    padding: 0.45rem 0.65rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #171d21;
    color: #f1f5f9;
    font-size: 14px;
}

.rating-select:focus {
    outline: none;
    border-color: rgba(226, 215, 3, 0.45);
}

.btn-rating-submit {
    padding: 0.45rem 0.85rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    border: none;
    background: rgba(226, 215, 3, 0.2);
    color: #e2d703;
    border: 1px solid rgba(226, 215, 3, 0.35);
    transition: background 0.2s, color 0.2s;
}

.btn-rating-submit:hover {
    background: rgba(226, 215, 3, 0.3);
    color: #fff;
}

.rating-mine {
    margin: 0.65rem 0 0;
    font-size: 12px;
    color: #94a3b8;
}

.rating-mine strong {
    color: #e2d703;
}

.rating-login-hint {
    margin: 0.75rem 0 0;
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.45;
}

.watchlist-form {
    margin-top: 0.9rem;
}

.watchlist-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.85rem;
    border-radius: 10px;
    border: 1px solid rgba(226, 215, 3, 0.35);
    background: rgba(226, 215, 3, 0.12);
    color: #e2d703;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.watchlist-btn:hover {
    background: rgba(226, 215, 3, 0.22);
    color: #fff;
}

.watchlist-btn.added {
    background: rgba(52, 211, 153, 0.16);
    border-color: rgba(52, 211, 153, 0.55);
    color: #6ee7b7;
}

.user-library-panel {
    margin-top: 1.1rem;
}

.lib-title-second {
    margin-top: 1.1rem;
}

.lib-empty {
    margin: 0;
    color: #94a3b8;
    font-size: 13px;
}

.lib-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.lib-list li {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.15rem 0.6rem;
    align-items: center;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

.lib-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.lib-list a {
    color: #f1f5f9;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

.lib-list a:hover {
    color: #e2d703;
}

.lib-list small {
    grid-column: 1 / 2;
    color: #64748b;
    font-size: 11px;
}

.lib-list time {
    color: #94a3b8;
    font-size: 11px;
    white-space: nowrap;
}

.video-unavailable {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 200px;
    padding: 1.5rem;
    text-align: center;
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.55;
}

/* BODY */
.movie-body {
    max-width: 1100px;
    margin: 0 auto;
}

.panel {
    background: rgba(15, 23, 42, 0.5);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 1.25rem 1.25rem 1.5rem;
}

.panel-title {
    font-size: 1rem;
    font-weight: 600;
    color: #e2d703;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .panel-title i {
        opacity: 0.9;
    }

/* EPISODES */
.episodes-panel {
    margin-bottom: 1.25rem;
}

.episodes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ep-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 4.5rem;
    padding: 0.55rem 1rem;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    color: #e2e7ef;
    background: rgba(23, 29, 33, 0.9);
    border: 1px solid rgba(226, 215, 3, 0.35);
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}

    .ep-btn:hover {
        border-color: #e2d703;
        color: #fff;
    }

    .ep-btn.active {
        background: #e2d703;
        color: #171d21;
        border-color: #e2d703;
    }

/* TWO COLUMN */
.movie-columns {
    display: grid;
    grid-template-columns: 1fr minmax(260px, 340px);
    gap: 1.25rem;
    align-items: start;
}

/* COMMENTS */
.comment-form textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #171d21;
    color: #f1f5f9;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    min-height: 88px;
    margin-bottom: 0.75rem;
}

    .comment-form textarea:focus {
        outline: none;
        border-color: rgba(226, 215, 3, 0.55);
        box-shadow: 0 0 0 2px rgba(226, 215, 3, 0.12);
    }

    .comment-form textarea::placeholder {
        color: #64748b;
    }

.btn-submit {
    padding: 0.6rem 1.25rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    border: none;
    background: #e2d703;
    color: #171d21;
    transition: filter 0.2s, transform 0.15s;
}

    .btn-submit:hover {
        filter: brightness(1.05);
    }

.comment-login-hint {
    color: #94a3b8;
    font-size: 14px;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    border: 1px dashed rgba(226, 215, 3, 0.25);
}

.link-login {
    color: #e2d703;
    font-weight: 600;
    text-decoration: none;
}

    .link-login:hover {
        text-decoration: underline;
    }

.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
    margin-top: 1rem;
    max-height: 420px;
    overflow-y: auto;
}

.comment-empty {
    color: #64748b;
    font-size: 14px;
    padding: 1rem 0;
}

.comment-item {
    display: flex;
    gap: 0.85rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

    .comment-item:last-child {
        border-bottom: none;
    }

.comment-avatar-wrap {
    flex-shrink: 0;
}

.comment-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(226, 215, 3, 0.35);
    background: #171d21;
}

.comment-body {
    min-width: 0;
    flex: 1;
}

.comment-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem 1rem;
    margin-bottom: 0.35rem;
}

.comment-author {
    font-weight: 600;
    color: #fff;
    font-size: 14px;
}

.comment-time {
    font-size: 12px;
    color: #64748b;
}

.comment-text {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: #cbd5e1;
    word-break: break-word;
}

/* CAST */
.cast-empty {
    color: #64748b;
    font-size: 14px;
}

.cast-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.cast-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0.75rem 0.5rem;
    border-radius: 12px;
    background: rgba(23, 29, 33, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: border-color 0.2s, box-shadow 0.2s;
}

    .cast-card:hover {
        border-color: rgba(226, 215, 3, 0.35);
        box-shadow: 0 0 0 1px rgba(226, 215, 3, 0.12);
    }

.cast-v0 { border-top: 3px solid rgba(226, 215, 3, 0.9); }
.cast-v1 { border-top: 3px solid rgba(250, 204, 21, 0.6); }
.cast-v2 { border-top: 3px solid rgba(52, 211, 153, 0.55); }
.cast-v3 { border-top: 3px solid rgba(96, 165, 250, 0.55); }
.cast-v4 { border-top: 3px solid rgba(244, 114, 182, 0.45); }

.cast-photo {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 0.5rem;
    border: 2px solid rgba(226, 215, 3, 0.25);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

    .cast-photo img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

.cast-name {
    font-size: 12px;
    font-weight: 600;
    color: #e2e7ef;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 900px) {
    .movie-header {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .poster {
        max-width: 160px;
        margin: 0 auto;
    }

    .rating-box {
        max-width: none;
        margin: 0;
        flex-direction: column;
    }

    .rating-form {
        min-width: 0;
        max-width: none;
        width: 100%;
    }

    .movie-columns {
        grid-template-columns: 1fr;
    }

    .cast-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 520px) {
    .movie-page {
        padding: 16px 16px 32px;
    }

    .cast-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.movie-detail-interactions {
    max-width: 1200px;
    margin: 18px auto 36px;
}

.comment-panel {
    background: rgba(15, 22, 30, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
}

.comment-panel h3 {
    margin-bottom: 12px;
    color: #e2d703;
    font-size: 18px;
}

.btn-submit-rating {
    margin-top: 10px;
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    background: #e2d703;
    color: #171d21;
    font-weight: 600;
}

.rating-login-note {
    color: #cbd5e1;
    font-size: 14px;
}

.rating-login-note a {
    color: #e2d703;
}

.comment-form-inline textarea {
    width: 100%;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: #171d21;
    color: #fff;
    padding: 10px;
}

.comment-list-inline {
    margin-top: 14px;
    max-height: 350px;
    overflow-y: auto;
}

.comment-item-inline {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.comment-avatar-inline {
    width: 38px;
    height: 38px;
    border-radius: 50%;
}

.comment-head-inline {
    display: flex;
    gap: 10px;
    align-items: baseline;
}

.comment-head-inline span {
    color: #94a3b8;
    font-size: 12px;
}

.comment-content-inline p {
    margin: 4px 0 0;
    color: #e2e8f0;
    font-size: 14px;
}

.watchlist-toast {
    position: fixed;
    right: 20px;
    top: 90px;
    background: #22c55e;
    color: #fff;
    border-radius: 8px;
    padding: 10px 14px;
    font-weight: 600;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: all 0.2s ease;
    z-index: 1200;
}

.watchlist-toast.show {
    opacity: 1;
    transform: translateY(0);
}

