/* ========================================
   Movie Detail Page Styles
   Extracted from views/detail.php
   ======================================== */

/* Movie Detail Page Styles */
/* body {} removed — canonical definition is in header.css */
/* .menu-bar override removed — menu-bar.css dropdown z-index (1000) already exceeds player elements (5-10) */

/* Backdrop Player Section - Fixed size for desktop */
.backdrop-player {
    position: relative;
    width: 1300px;
    height: 700px;
    overflow: hidden;
    background: #0a0a0a;
    border-radius: 12px;
    margin: 0 auto;
}

.backdrop-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
}

.backdrop-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to bottom, transparent, #18181b);
}

/* play-overlay, play-button, player-iframe-container → content-shared.css */

/* Movie Info Section */
.movie-detail-section {
    padding: 15px 0 60px;
}

.movie-content-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 40px;
    backdrop-filter: blur(20px);
    /* Subtle shadow to lift it */
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

/* Cast container spacing utility */
.movie-content-card.mt-30 {
    margin-top: 20px;
}

.movie-detail-grid {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 40px;
}

.movie-poster-wrapper {
    position: relative;
}

.movie-poster-img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.movie-details {
    padding-top: 10px;
}

.movie-title-main {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.movie-title-main .year-link {
    font-weight: 400;
    color: var(--text-muted);
    text-decoration: none;
}

.movie-title-main .year-link:hover {
    color: var(--text);
}

.original-title {
    color: var(--text-dim);
    font-size: 14px;
    margin-bottom: 15px;
}

.movie-meta-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    font-size: 14px;
}

.imdb-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f5c518;
    color: #000;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 800;
    font-size: 13px;
}

.imdb-score {
    color: var(--text);
    font-weight: 700;
}



.genre-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.genre-links a:hover {
    color: var(--accent);
}

.meta-info {
    color: var(--text-muted);
}

.meta-info strong {
    color: var(--text);
}

.meta-info a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.meta-info a:hover {
    color: var(--accent);
}

/* action-buttons, btn-action, btn-trailer, btn-like.active, dropdown-wrapper/menu/item → content-shared.css */

/* Overview - Trapez/funnel shape text */
.movie-overview {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.7;
    display: block;
    overflow: hidden;
}

.movie-overview::before {
    content: '';
    float: right;
    width: 150px;
    height: 100%;
    shape-outside: polygon(100% 0, 100% 100%, 0 100%);
}

/* cast-section base → content-shared.css */

.section-heading {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text);
}

.cast-scroll {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.cast-scroll::-webkit-scrollbar {
    height: 6px;
}

.cast-scroll::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 3px;
}

.cast-scroll::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.cast-card {
    flex-shrink: 0;
    width: 100px;
    text-align: center;
    text-decoration: none;
    color: inherit;
}

.cast-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg-secondary);
    margin-bottom: 8px;
    border: 2px solid #444;
    transition: 0.2s;
}

.cast-card:hover .cast-photo {
    border-color: #8a2128;
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(138, 33, 40, 0.4);
}

.cast-name {
    font-size: 12px;
    color: var(--text);
    font-weight: 600;
    max-width: 80px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cast-character {
    font-size: 11px;
    color: var(--text-dim);
    max-width: 80px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* View Full Cast Button Card */
.view-full-cast-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 90px;
    max-width: 90px;
    min-height: 135px;
    background: rgba(138, 33, 40, 0.15);
    border: 2px dashed #8a2128;
    border-radius: 8px;
    transition: all 0.3s ease;
    flex-shrink: 0;
    box-sizing: border-box;
}

.view-full-cast-card:hover {
    background: rgba(138, 33, 40, 0.3);
    border-color: #e50914;
}

.view-full-cast-card .view-full-cast-icon {
    font-size: 24px;
    color: #e50914;
    font-weight: 400;
    line-height: 1;
    margin-bottom: 8px;
}

.view-full-cast-card .cast-name {
    font-size: 11px;
    text-align: center;
    max-width: 75px;
    white-space: normal;
    line-height: 1.3;
}

/* Trailer Modal */
.trailer-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.trailer-modal.show {
    display: flex;
}

.trailer-content {
    position: relative;
    width: 90%;
    max-width: 900px;
    aspect-ratio: 16/9;
    background: #000;
}

.trailer-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
}

.trailer-content iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Responsive - Tablet */
@media (max-width: 992px) {
    .backdrop-player {
        width: 100%;
        height: auto;
        aspect-ratio: 16/9;
    }

    .main-container {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {

    /* Main container */
    .main-container {
        padding-left: 12px;
        padding-right: 12px;
        padding-top: 60px;
    }

    /* Player responsive */
    .backdrop-player {
        width: 100%;
        height: auto;
        aspect-ratio: 4/3;
        border-radius: 8px;
    }

    .play-button {
        width: 60px;
        height: 60px;
    }

    /* Movie detail grid - single column, no poster */
    .movie-detail-grid {
        grid-template-columns: 1fr;
        text-align: left;
        gap: 0;
    }

    /* Hide poster on mobile */
    .movie-poster-wrapper {
        display: none;
    }

    /* Title and content - left aligned */
    .movie-title-main {
        font-size: 22px;
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
        text-align: left;
    }

    .movie-details {
        max-width: 100%;
        overflow: hidden;
        text-align: left;
    }

    /* Meta info - reorganized layout */
    .movie-meta-row {
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 8px 16px;
        text-align: left;
    }

    .meta-separator {
        display: none;
    }

    /* Action buttons - Trailer left, Like+AddToList right on mobile */
    .action-buttons {
        justify-content: space-between;
        flex-wrap: nowrap;
        gap: 0;
        align-items: center;
    }

    .btn-action {
        flex: 0 0 auto;
        min-width: auto;
        justify-content: center;
        padding: 10px 16px;
    }

    /* Dropdown wrapper should also be inline */
    .dropdown-wrapper {
        flex: 0 0 auto;
    }

    /* Dropdown menu - ensure it doesn't overflow */
    .dropdown-menu {
        right: 0;
        left: auto;
        min-width: 150px;
        white-space: nowrap;
    }

    /* Trailer button stays on left */
    .btn-trailer {
        margin-right: auto;
    }

    /* Like button - icon only, 8px gap after */
    .btn-like {
        padding: 8px 10px;
        margin-right: 8px;
    }

    .btn-like>.btn-text {
        display: none;
    }

    /* Overview */
    .movie-overview {
        text-align: left;
        font-size: 14px;
    }

    /* Cast section */
    .cast-section {
        margin-top: 30px;
        padding-top: 20px;
    }

    .cast-scroll {
        gap: 12px;
    }

    .cast-photo {
        width: 60px;
        height: 60px;
    }

    .cast-name {
        font-size: 11px;
        max-width: 60px;
    }
}

/* Responsive - Small Mobile */
@media (max-width: 480px) {
    .movie-title-main {
        font-size: 18px;
    }

    .movie-poster-wrapper {
        max-width: 150px;
    }

    .btn-action {
        padding: 10px 14px;
        font-size: 12px;
    }

    .section-heading {
        font-size: 16px;
    }
}

/* ========================================
   Boxset (Film Serisi) Section
   ======================================== */

.boxset-section {
    padding: 0;
}

.boxset-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.boxset-header .section-heading {
    margin-bottom: 0;
}

.boxset-count {
    font-size: 13px;
    color: var(--text-dim);
    background: rgba(255, 255, 255, 0.06);
    padding: 4px 10px;
    border-radius: 12px;
    white-space: nowrap;
}

.boxset-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.boxset-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
}

.boxset-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.boxset-current {
    background: rgba(138, 33, 40, 0.15);
    border-left: 3px solid #e50914;
    padding-left: 9px;
}

.boxset-current:hover {
    background: rgba(138, 33, 40, 0.25);
}

.boxset-hidden {
    display: none;
}

.boxset-poster {
    width: 40px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    background: var(--bg-secondary);
}

.boxset-info {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.boxset-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.boxset-year {
    font-size: 13px;
    color: var(--text-dim);
    flex-shrink: 0;
}

.boxset-rating {
    font-size: 13px;
    color: #f5c518;
    font-weight: 600;
    flex-shrink: 0;
    margin-left: auto;
}

.boxset-toggle {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.boxset-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Boxset Mobile */
@media (max-width: 768px) {
    .boxset-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .boxset-item {
        padding: 6px 8px;
        gap: 10px;
    }

    .boxset-title {
        font-size: 13px;
    }
}