/**
 * Trailer Modal Styles
 * Clean, modern modal for YouTube trailers
 */

/* Modal Overlay */
.trailer-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.trailer-modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

/* Modal Container */
.trailer-modal {
    position: relative;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.7);
    transition: transform 0.3s ease;
}

.trailer-modal-overlay.active .trailer-modal {
    transform: scale(1);
}

/* Modal Header */
.trailer-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: linear-gradient(135deg, #F9690E, #C02425);
    color: white;
}

.trailer-modal-title {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.trailer-modal-title i {
    font-size: 1.2rem;
}

/* Close Button */
.trailer-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    line-height: 1;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trailer-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Video Container */
.trailer-modal-video {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    background: #000;
}

.trailer-modal-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Loading State */
.trailer-modal-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #F9690E;
    font-size: 2rem;
    display: none;
}

.trailer-modal-loading.active {
    display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .trailer-modal {
        width: 95%;
        margin: 20px;
    }
    
    .trailer-modal-header {
        padding: 15px 20px;
    }
    
    .trailer-modal-title {
        font-size: 1.2rem;
    }
    
    .trailer-modal-close {
        font-size: 1.3rem;
        width: 30px;
        height: 30px;
    }
}

@media (max-width: 480px) {
    .trailer-modal {
        width: 100%;
        margin: 10px;
        border-radius: 0;
    }
    
    .trailer-modal-header {
        padding: 12px 15px;
    }
    
    .trailer-modal-title {
        font-size: 1.1rem;
    }
}

/* Animation for modal entrance */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.7);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.trailer-modal-overlay.active .trailer-modal {
    animation: modalFadeIn 0.3s ease;
}

/* Prevent body scroll when modal is open */
body.trailer-modal-open {
    overflow: hidden;
}

/* Enhanced trailer button styling */
.trailer-button.btn,
.trailer-button {
    display: inline-block !important;
    width: 100% !important;
    padding: 12px 20px !important;
    background: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
    color: white !important;
    text-decoration: none !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    font-size: 0.9rem !important;
    text-align: center !important;
    line-height: 1.4 !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    position: relative !important;
    transform: translateY(0px) !important;
    box-shadow: none !important;
}

.trailer-button.btn:hover,
.trailer-button:hover {
    background: var(--primary-gradient) !important;
    background-size: 150% auto !important;
    background-position: right center !important;
    border-color: transparent !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4) !important;
    color: white !important;
    text-decoration: none !important;
}

.trailer-button i {
    font-size: 1rem;
    margin-right: 8px;
}
