/* Modal Styles - Dedicated CSS for modal functionality */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(15px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    padding: 1rem;
    overflow-y: auto;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.drama-modal {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    max-width: 900px;
    width: 85%;
    max-height: 85vh;
    overflow-y: auto;
    backdrop-filter: blur(20px);
    transform: scale(0.8);
    transition: transform 0.3s ease;
    position: relative;
}

.modal-overlay.active .drama-modal {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1;
}

.modal-close:hover {
    background: rgba(255, 107, 107, 0.8);
}

.modal-content {
    display: grid;
    grid-template-columns: 1fr 1.8fr;
    gap: 2.5rem;
    padding: 2.5rem;
    align-items: start;
}

.modal-poster {
    position: relative;
}

.modal-poster img {
    width: 100%;
    border-radius: 15px;
    aspect-ratio: 16/20;
    object-fit: cover;
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 107, 107, 0.9);
    border: none;
    color: white;
    padding: 1rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    width: 80px;
    height: 80px;
}

.play-overlay:hover {
    background: #ff6b6b;
    transform: translate(-50%, -50%) scale(1.1);
}

.modal-info {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.modal-info h2 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    color: white;
    line-height: 1.3;
    font-weight: 700;
}

.modal-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.modal-meta span {
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.2);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: rgba(255, 215, 0, 0.9);
    font-weight: 500;
}

.rating {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: #ffa726 !important;
}

.tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.tag {
    background: rgba(255, 107, 107, 0.2);
    color: #ff6b6b;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-size: 0.7rem;
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.description {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
    margin-bottom: 2.5rem;
    font-size: 1rem;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: auto;
}

.watch-btn {
    padding: 1rem 2rem;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 600;
    font-size: 1.1rem;
    background: linear-gradient(45deg, #ff6b6b, #ffa726);
    color: white;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
}

.wishlist-btn,
.share-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.watch-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 35px rgba(255, 107, 107, 0.5);
    background: linear-gradient(45deg, #ff5252, #ff9800);
}

.wishlist-btn:hover,
.share-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #ff6b6b;
}

/* Enhanced Mobile responsive */
@media (max-width: 768px) {
    .modal-overlay {
        align-items: flex-start;
        padding: 1rem 0.5rem;
    }
    
    .drama-modal {
        margin: 2rem 0;
        width: 100%;
        max-width: none;
        border-radius: 16px;
    }
    
    .modal-content {
        grid-template-columns: 1fr;
        padding: 1.5rem;
        gap: 1.5rem;
    }
    
    .modal-poster {
        max-width: 200px;
        margin: 0 auto;
    }
    
    .modal-info h2 {
        font-size: 1.5rem;
        text-align: center;
    }
    
    .modal-meta {
        justify-content: center;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .watch-btn,
    .wishlist-btn,
    .share-btn {
        width: 100%;
        justify-content: center;
        min-height: 48px;
        font-size: 1rem;
    }
    
    .modal-close {
        top: 0.5rem;
        right: 0.5rem;
        min-width: 44px;
        min-height: 44px;
    }
}
