/**
 * StreamBox - Single Movie Player Styles
 * Premium Netflix-style streaming player UI
 * 
 * @package StreamBox
 * @since 1.0.0
 */

/* ============================================
   Player Wrapper
   ============================================ */

.movie-player-wrapper {
    position: relative;
    width: 100%;
    background: #000;
}

/* ============================================
   Player Container
   ============================================ */

.movie-player-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    background: #000;
}

.movie-player-inner {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #0a0a0a;
}

.movie-player-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.movie-player-frame iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* ============================================
   Player Loading State
   ============================================ */

.movie-player-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #0a0a0a;
    color: #fff;
    z-index: 1;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
}

.movie-player-frame:not(:empty) ~ .movie-player-loading {
    opacity: 0;
}

.movie-player-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: #e50914;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.movie-player-loading p {
    margin: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

/* ============================================
   Player Placeholder (No Embed)
   ============================================ */

.movie-player-placeholder {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.movie-player-placeholder-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
    color: rgba(255, 255, 255, 0.6);
}

.movie-player-placeholder-icon {
    margin-bottom: 24px;
    opacity: 0.3;
}

.movie-player-placeholder-inner h3 {
    margin: 0 0 12px;
    font-size: 22px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}

.movie-player-placeholder-inner p {
    margin: 0;
    font-size: 15px;
    max-width: 400px;
}

/* ============================================
   Movie Details Section
   ============================================ */

.movie-details-wrapper {
    background: #141414;
    padding: 60px 0;
    color: #fff;
}

.movie-details-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 60px;
}

/* ============================================
   Main Content Column
   ============================================ */

.movie-details-main {
    min-width: 0;
}

.movie-header {
    margin-bottom: 50px;
}

.movie-title {
    margin: 0 0 20px;
    font-size: 48px;
    font-weight: 800;
    line-height: 1.2;
    color: #fff;
    letter-spacing: -0.02em;
}

.movie-meta-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.movie-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 17px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
}

.movie-meta-item svg {
    flex-shrink: 0;
}

.movie-meta-rating {
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 600;
    color: #fff;
}

.movie-meta-quality {
    padding: 4px 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    font-weight: 600;
    color: #fff;
}

.movie-meta-imdb {
    padding: 4px 10px;
    background: #f5c518;
    border-radius: 4px;
    font-weight: 600;
    color: #000;
}

/* Genres */
.movie-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.movie-genre-tag {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.movie-genre-tag:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Section Titles */
.movie-section-title {
    margin: 0 0 24px;
    font-size: 26px;
    font-weight: 700;
    color: #fff;
}

/* Description */
.movie-description {
    margin-bottom: 50px;
}

.movie-description-content {
    font-size: 16px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.85);
}

.movie-description-content p {
    margin: 0 0 16px;
}

.movie-description-content p:last-child {
    margin-bottom: 0;
}

/* Trailer Section */
.movie-trailer-section {
    margin-bottom: 50px;
}

.movie-trailer-wrapper {
    position: relative;
    width: 100%;
    max-width: 800px;
}

.movie-trailer-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
}

.movie-trailer-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ============================================
   Sidebar Column
   ============================================ */

.movie-details-sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
}

/* Poster Card */
.movie-poster-card {
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    background-color: #1a1f3a;
}

.movie-poster-image {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
}

/* Info Card */
.movie-info-card {
    margin-bottom: 30px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.movie-info-title {
    margin: 0 0 20px;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.movie-info-list {
    margin: 0;
}

.movie-info-item {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.movie-info-item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.movie-info-item dt {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
}

.movie-info-item dd {
    margin: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
}

.movie-info-item a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #5ab9ff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.movie-info-item a:hover {
    color: #7dc9ff;
}

.movie-info-item a svg {
    opacity: 0.7;
}

/* Share Card */
.movie-share-card {
    padding: 24px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.movie-share-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.movie-share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.movie-share-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.movie-share-facebook {
    background: #1877f2;
    border-color: #1877f2;
}

.movie-share-facebook:hover {
    background: #166fe5;
}

.movie-share-twitter {
    background: #1da1f2;
    border-color: #1da1f2;
}

.movie-share-twitter:hover {
    background: #1a91da;
}

/* ============================================
   Responsive Design
   ============================================ */

/* Tablets (≤1024px) */
@media (max-width: 1024px) {
    .movie-details-grid {
        grid-template-columns: 1fr 320px;
        gap: 40px;
    }
    
    .movie-title {
        font-size: 36px;
    }
    
    .movie-details-sidebar {
        top: 80px;
    }
}

/* Mobile Landscape & Tablets (≤768px) */
@media (max-width: 768px) {
    .movie-details-wrapper {
        padding: 40px 0;
    }
    
    .movie-details-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .movie-title {
        font-size: 32px;
    }
    
    .movie-section-title {
        font-size: 22px;
    }
    
    .movie-details-sidebar {
        position: static;
        max-width: 500px;
        margin: 0 auto;
    }
    
    .movie-poster-card {
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Mobile (≤480px) */
@media (max-width: 480px) {
    .movie-details-wrapper {
        padding: 30px 0;
    }
    
    .movie-header {
        margin-bottom: 30px;
    }
    
    .movie-title {
        font-size: 26px;
        margin-bottom: 16px;
    }
    
    .movie-meta-bar {
        gap: 10px;
    }
    
    .movie-meta-item {
        font-size: 13px;
    }
    
    .movie-section-title {
        font-size: 20px;
        margin-bottom: 16px;
    }
    
    .movie-description-content {
        font-size: 15px;
    }
    
    .movie-info-card,
    .movie-share-card {
        padding: 20px;
    }
    
    .movie-info-item {
        grid-template-columns: 80px 1fr;
        gap: 8px;
        padding: 10px 0;
    }
}
